summaryrefslogtreecommitdiff
path: root/Presence/ServerC.hs
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2013-11-17 17:01:13 -0500
committerjoe <joe@jerkface.net>2013-11-17 17:01:13 -0500
commit8ac3eda353868f04d4a2bfb503f3f286b1967476 (patch)
treefbb762e00cafa6426e84fc106b44fc7b76b5911e /Presence/ServerC.hs
parent1f6320c1f8a678cfe58b6327e91fbb5d24cea80d (diff)
close socket on ping timeout
Diffstat (limited to 'Presence/ServerC.hs')
-rw-r--r--Presence/ServerC.hs4
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
59quitListening :: ServerHandle -> IO () 59quitListening :: ServerHandle -> IO ()
60quitListening (ServerHandle socket) = sClose socket 60quitListening (ServerHandle socket) = Socket.sClose socket
61 61
62 62
63data AcceptResult = 63data 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