refactor transport encoding, make client IO error "temporary" (#634)

* file server/client framework

* refactor

* make IOError temporary

* fix test
This commit is contained in:
Evgeny Poberezkin
2023-02-10 19:06:28 +00:00
committed by GitHub
parent b342b1dc59
commit eb1723acce
9 changed files with 55 additions and 36 deletions
@@ -319,7 +319,7 @@ clientDisconnected NtfServerClient {connected} = atomically $ writeTVar connecte
receive :: Transport c => THandle c -> NtfServerClient -> M ()
receive th NtfServerClient {rcvQ, sndQ, activeAt} = forever $ do
ts <- tGet th
ts <- liftIO $ tGet th
forM_ ts $ \t@(_, _, (corrId, entId, cmdOrError)) -> do
atomically . writeTVar activeAt =<< liftIO getSystemTime
logDebug "received transmission"