Permalink
Browse files

Fix memory leak in TLS closed connections (snoyberg/keter#13)

  • Loading branch information...
1 parent a445766 commit e701c41b80bb3242e7ff7bdb1cd145b938193e69 @snoyberg committed Apr 2, 2013
@@ -167,4 +167,6 @@ recvExact socket =
| rest == 0 = return $ S.concat $ front []
| otherwise = do
next <- recv socket rest
- loop (front . (next:)) $ rest - S.length next
+ if S.length next == 0
+ then return $ S.concat $ front []
+ else loop (front . (next:)) $ rest - S.length next
@@ -1,5 +1,5 @@
name: network-conduit-tls
-version: 1.0.0.1
+version: 1.0.0.2
synopsis: Create TLS-aware network code with conduits
description: Uses the tls package for a pure-Haskell implementation.
homepage: https://github.com/snoyberg/conduit

0 comments on commit e701c41

Please sign in to comment.