summaryrefslogtreecommitdiff
path: root/Presence
diff options
context:
space:
mode:
Diffstat (limited to 'Presence')
-rw-r--r--Presence/LockedChan.hs7
-rw-r--r--Presence/Server.hs6
-rw-r--r--Presence/XMPPServer.hs6
3 files changed, 13 insertions, 6 deletions
diff --git a/Presence/LockedChan.hs b/Presence/LockedChan.hs
index a562bc58..eac2b5ad 100644
--- a/Presence/LockedChan.hs
+++ b/Presence/LockedChan.hs
@@ -51,9 +51,10 @@ cloneLChan c = do
51 l2 <- newTVar True 51 l2 <- newTVar True
52 return $ LockedChan l2 c2 52 return $ LockedChan l2 c2
53 else return Nothing 53 else return Nothing
54 return $ maybe (error "Attempt to clone unlocked channel") 54 maybe (do putStrLn "LockedChan: Attempt to clone unlocked channel"
55 id 55 error "Attempt to clone unlocked channel")
56 mchan 56 return
57 mchan
57 58
58#if MIN_VERSION_stm(2,4,0) 59#if MIN_VERSION_stm(2,4,0)
59#else 60#else
diff --git a/Presence/Server.hs b/Presence/Server.hs
index 87644946..24cd5bce 100644
--- a/Presence/Server.hs
+++ b/Presence/Server.hs
@@ -524,6 +524,9 @@ newConnection server params conkey u h inout = do
524 let utc' = formatTime defaultTimeLocale "%s" utc 524 let utc' = formatTime defaultTimeLocale "%s" utc
525 warn $ "TIMEOUT " <> bshow utc' <> " " <> bshow (pingIdle me, pingTimeOut me) 525 warn $ "TIMEOUT " <> bshow utc' <> " " <> bshow (pingIdle me, pingTimeOut me)
526 -} 526 -}
527 utc <- getCurrentTime
528 let utc' = formatTime defaultTimeLocale "%s" utc
529 warn $ "ping:TIMEOUT " <> bshow utc'
527 atomically (connClose newCon) 530 atomically (connClose newCon)
528 eof 531 eof
529 532
@@ -534,6 +537,9 @@ newConnection server params conkey u h inout = do
534 let utc' = formatTime defaultTimeLocale "%s" utc 537 let utc' = formatTime defaultTimeLocale "%s" utc
535 warn $ "IDLE" <> bshow utc' <> " " <> bshow (pingIdle me, pingTimeOut me) 538 warn $ "IDLE" <> bshow utc' <> " " <> bshow (pingIdle me, pingTimeOut me)
536 -} 539 -}
540 utc <- getCurrentTime
541 let utc' = formatTime defaultTimeLocale "%s" utc
542 warn $ "ping:IDLE " <> bshow utc'
537 atomically $ announce ((conkey,u),RequiresPing) 543 atomically $ announce ((conkey,u),RequiresPing)
538 handleEOF conkey u mvar newCon 544 handleEOF conkey u mvar newCon
539 545
diff --git a/Presence/XMPPServer.hs b/Presence/XMPPServer.hs
index b895597f..1d527246 100644
--- a/Presence/XMPPServer.hs
+++ b/Presence/XMPPServer.hs
@@ -1186,13 +1186,13 @@ forkConnection sv xmpp k laddr pingflag src snk stanzas = do
1186 let from = me -- Look it up from Server object 1186 let from = me -- Look it up from Server object
1187 -- or pass it with Connection event. 1187 -- or pass it with Connection event.
1188 mid = Just "ping" 1188 mid = Just "ping"
1189 ping = makePing namespace mid to from 1189 ping0 = makePing namespace mid to from
1190 ping <- atomically $ wrapStanzaList ping 1190 ping <- atomically $ wrapStanzaList ping0
1191 mapM_ (atomically . Slotted.push slots (Just $ PingSlot)) 1191 mapM_ (atomically . Slotted.push slots (Just $ PingSlot))
1192 ping 1192 ping
1193#ifdef PINGNOISE 1193#ifdef PINGNOISE
1194 wlog "" 1194 wlog ""
1195 CL.sourceList ping $$ prettyPrint $ case k of 1195 CL.sourceList ping0 $$ prettyPrint $ case k of
1196 ClientKey {} -> "C<-Ping" 1196 ClientKey {} -> "C<-Ping"
1197 PeerKey {} -> "P<-Ping " 1197 PeerKey {} -> "P<-Ping "
1198#endif 1198#endif