some TCP cleanup

This commit is contained in:
voidlizard 2024-11-01 10:52:29 +03:00
parent 4f1f1a0e7e
commit 6cca320c34
1 changed files with 3 additions and 2 deletions

View File

@ -268,9 +268,10 @@ spawnConnection tp env so sa = liftIO do
sendLazy so frame --(LBS.toStrict frame) sendLazy so frame --(LBS.toStrict frame)
next next
void $ waitAnyCatchCancel [rd,wr] ContT $ bracket none $ \_ -> mapM cancel [rd,wr]
ContT $ bracket (pure connId) cleanupConn
-- lift $ cleanupConn connId void $ waitAnyCatchCancel [rd,wr]
-- gracefulClose so 1000 -- gracefulClose so 1000
debug $ "spawnConnection exit" <+> pretty sa debug $ "spawnConnection exit" <+> pretty sa