diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2023-09-14 21:05:07 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2023-09-16 09:58:30 +0200 |
commit | cbdffb714cf24eacfe08586f56109e46df234806 (patch) | |
tree | 98838afbd8b5b242b9c3481af0fbc37cba7feee2 /src/Network | |
parent | 07893b2edd6f872f9549b3e0eb5443208cdea66a (diff) |
Protocol: check if control flow is free before processing incoming packet
Diffstat (limited to 'src/Network')
-rw-r--r-- | src/Network/Protocol.hs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Network/Protocol.hs b/src/Network/Protocol.hs index e286a67..0f099e0 100644 --- a/src/Network/Protocol.hs +++ b/src/Network/Protocol.hs @@ -267,6 +267,7 @@ passUpIncoming GlobalState {..} = do processIncoming :: GlobalState addr -> STM (IO ()) processIncoming gs@GlobalState {..} = do guard =<< isEmptyTMVar gNextUp + guard =<< canWriteFlow gControlFlow (addr, msg) <- readFlow gDataFlow mbconn <- findConnection gs addr |