diff options
author | joe <joe@jerkface.net> | 2013-11-17 17:01:13 -0500 |
---|---|---|
committer | joe <joe@jerkface.net> | 2013-11-17 17:01:13 -0500 |
commit | 8ac3eda353868f04d4a2bfb503f3f286b1967476 (patch) | |
tree | fbb762e00cafa6426e84fc106b44fc7b76b5911e /Presence/ServerC.hs | |
parent | 1f6320c1f8a678cfe58b6327e91fbb5d24cea80d (diff) |
close socket on ping timeout
Diffstat (limited to 'Presence/ServerC.hs')
-rw-r--r-- | Presence/ServerC.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Presence/ServerC.hs b/Presence/ServerC.hs index d8cca897..0acfb20a 100644 --- a/Presence/ServerC.hs +++ b/Presence/ServerC.hs | |||
@@ -57,7 +57,7 @@ dummyServerHandle = do | |||
57 | return (ServerHandle sock) | 57 | return (ServerHandle sock) |
58 | 58 | ||
59 | quitListening :: ServerHandle -> IO () | 59 | quitListening :: ServerHandle -> IO () |
60 | quitListening (ServerHandle socket) = sClose socket | 60 | quitListening (ServerHandle socket) = Socket.sClose socket |
61 | 61 | ||
62 | 62 | ||
63 | data AcceptResult = | 63 | data AcceptResult = |
@@ -146,5 +146,5 @@ runConn g st (sock,_) = do | |||
146 | h <- socketToHandle sock ReadWriteMode | 146 | h <- socketToHandle sock ReadWriteMode |
147 | hSetBuffering h NoBuffering | 147 | hSetBuffering h NoBuffering |
148 | let doException (SomeException e) = debugStr ("\n\nexception: " ++ show e ++ "\n\n") | 148 | let doException (SomeException e) = debugStr ("\n\nexception: " ++ show e ++ "\n\n") |
149 | handle doException (g (restrictSocket sock `HCons` st) (packets h) (packetSink h)) | 149 | handle doException (g (restrictHandleSocket h sock `HCons` st) (packets h) (packetSink h)) |
150 | hClose h | 150 | hClose h |