websockets 0.8.1.3 → 0.8.2.0
raw patch · 3 files changed
+9/−4 lines, 3 files
Files
- CHANGELOG +2/−0
- src/Network/WebSockets/Client.hs +3/−3
- websockets.cabal +4/−1
+ CHANGELOG view
@@ -0,0 +1,2 @@+- 0.8.2.0+ * Fix possible leaking of client sockets when connection times out
src/Network/WebSockets/Client.hs view
@@ -57,13 +57,13 @@ -- Create and connect socket let hints = S.defaultHints {S.addrFamily = S.AF_INET, S.addrSocketType = S.Stream}- sock <- S.socket S.AF_INET S.Stream S.defaultProtocol addrInfos <- S.getAddrInfo (Just hints) (Just host) (Just $ show port)- S.connect sock (S.addrAddress $ head addrInfos)+ sock <- S.socket S.AF_INET S.Stream S.defaultProtocol -- Connect WebSocket and run client res <- finally- (runClientWithSocket sock host path opts customHeaders app)+ (S.connect sock (S.addrAddress $ head addrInfos) >>+ runClientWithSocket sock host path opts customHeaders app) (S.sClose sock) -- Clean up
websockets.cabal view
@@ -1,5 +1,5 @@ Name: websockets-Version: 0.8.1.3+Version: 0.8.2.0 Synopsis: A sensible and clean way to write WebSocket-capable servers in Haskell.@@ -39,6 +39,9 @@ Homepage: http://jaspervdj.be/websockets Bug-reports: https://github.com/jaspervdj/websockets/issues++Extra-source-files:+ CHANGELOG Library Hs-source-dirs: src