diff options
author | Andrew Cady <d@jerkface.net> | 2018-06-24 05:02:34 -0400 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2018-06-24 06:40:09 -0400 |
commit | c781c88c3cd77b70694a26c3f27ff82aa6fa65d3 (patch) | |
tree | 02b8e3635677f073eb959a8f6224e98ad85993ac /Announcer.hs | |
parent | 4c045e987892a0b32d86a93f0f521f497213341e (diff) |
Fixed handshake behavior
The handshake code would flood the network with interminable handshakes.
Diffstat (limited to 'Announcer.hs')
-rw-r--r-- | Announcer.hs | 8 |
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 | |||
46 | instance Show AnnounceKey where | 46 | instance Show AnnounceKey where |
47 | show (AnnounceKey bs) = "AnnounceKey " ++ show (Char8.unpack bs) | 47 | show (AnnounceKey bs) = "AnnounceKey " ++ show (Char8.unpack bs) |
48 | 48 | ||
49 | packAnnounceKey :: Announcer -> String -> STM AnnounceKey | 49 | packAnnounceKey :: Announcer -> String -> AnnounceKey |
50 | packAnnounceKey _ = return . AnnounceKey . Char8.pack | 50 | packAnnounceKey _ = AnnounceKey . Char8.pack |
51 | 51 | ||
52 | unpackAnnounceKey :: Announcer -> AnnounceKey -> STM String | 52 | unpackAnnounceKey :: Announcer -> AnnounceKey -> String |
53 | unpackAnnounceKey _ (AnnounceKey bs) = return $ Char8.unpack bs | 53 | unpackAnnounceKey _ (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 |