summaryrefslogtreecommitdiff
path: root/Announcer.hs
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2018-06-24 05:02:34 -0400
committerAndrew Cady <d@jerkface.net>2018-06-24 06:40:09 -0400
commitc781c88c3cd77b70694a26c3f27ff82aa6fa65d3 (patch)
tree02b8e3635677f073eb959a8f6224e98ad85993ac /Announcer.hs
parent4c045e987892a0b32d86a93f0f521f497213341e (diff)
Fixed handshake behavior
The handshake code would flood the network with interminable handshakes.
Diffstat (limited to 'Announcer.hs')
-rw-r--r--Announcer.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Announcer.hs b/Announcer.hs
index 41c1c2a6..89dc5c3b 100644
--- a/Announcer.hs
+++ b/Announcer.hs
@@ -46,11 +46,11 @@ newtype AnnounceKey = AnnounceKey ByteString
46instance Show AnnounceKey where 46instance Show AnnounceKey where
47 show (AnnounceKey bs) = "AnnounceKey " ++ show (Char8.unpack bs) 47 show (AnnounceKey bs) = "AnnounceKey " ++ show (Char8.unpack bs)
48 48
49packAnnounceKey :: Announcer -> String -> STM AnnounceKey 49packAnnounceKey :: Announcer -> String -> AnnounceKey
50packAnnounceKey _ = return . AnnounceKey . Char8.pack 50packAnnounceKey _ = AnnounceKey . Char8.pack
51 51
52unpackAnnounceKey :: Announcer -> AnnounceKey -> STM String 52unpackAnnounceKey :: Announcer -> AnnounceKey -> String
53unpackAnnounceKey _ (AnnounceKey bs) = return $ Char8.unpack bs 53unpackAnnounceKey _ (AnnounceKey bs) = Char8.unpack bs
54 54
55-- | Actions that can be scheduled to occur at some particular time in the 55-- | Actions that can be scheduled to occur at some particular time in the
56-- future. Since periodic event handlers are responsible for re-scheduling 56-- future. Since periodic event handlers are responsible for re-scheduling