summaryrefslogtreecommitdiff
path: root/Presence/Server.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Presence/Server.hs')
-rw-r--r--Presence/Server.hs9
1 files changed, 4 insertions, 5 deletions
diff --git a/Presence/Server.hs b/Presence/Server.hs
index e715a145..f8b1dfa1 100644
--- a/Presence/Server.hs
+++ b/Presence/Server.hs
@@ -136,7 +136,7 @@ data ServerInstruction conkey u
136 -- ^ kill the server. This command is automatically issued when 136 -- ^ kill the server. This command is automatically issued when
137 -- the server is released. 137 -- the server is released.
138 | Listen PortNumber (ConnectionParameters conkey u) 138 | Listen PortNumber (ConnectionParameters conkey u)
139 -- ^ listen for incomming connections 139 -- ^ listen for incoming connections
140 | Connect SockAddr (ConnectionParameters conkey u) 140 | Connect SockAddr (ConnectionParameters conkey u)
141 -- ^ connect to addresses 141 -- ^ connect to addresses
142 | ConnectWithEndlessRetry SockAddr 142 | ConnectWithEndlessRetry SockAddr
@@ -290,14 +290,13 @@ server allocate = do
290 `fmap` atomically (readTVar $ listenmap server) 290 `fmap` atomically (readTVar $ listenmap server)
291 when (not listening) $ do 291 when (not listening) $ do
292 292
293 let family = AF_INET6 293 let family = AF_INET6
294 let address = 294 address = case family of
295 case family of
296 AF_INET -> SockAddrInet port iNADDR_ANY 295 AF_INET -> SockAddrInet port iNADDR_ANY
297 AF_INET6 -> SockAddrInet6 port 0 iN6ADDR_ANY 0 296 AF_INET6 -> SockAddrInet6 port 0 iN6ADDR_ANY 0
298 297
299 sserv <- flip streamServer address ServerConfig 298 sserv <- flip streamServer address ServerConfig
300 { serverWarn = hPutStrLn stderr 299 { serverWarn = hPutStrLn stderr
301 , serverSession = \sock _ h -> do 300 , serverSession = \sock _ h -> do
302 (conkey,u) <- makeConnKey params sock 301 (conkey,u) <- makeConnKey params sock
303 _ <- newConnection server params conkey u h In 302 _ <- newConnection server params conkey u h In