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
+1 -1
View File
@@ -260,7 +260,7 @@ cancelSub sub =
receive :: Transport c => THandle c -> Client -> M ()
receive th Client {rcvQ, sndQ, activeAt} = forever $ do
ts <- L.toList <$> tGet th
ts <- L.toList <$> liftIO (tGet th)
atomically . writeTVar activeAt =<< liftIO getSystemTime
as <- partitionEithers <$> mapM cmdAction ts
write sndQ $ fst as