summaryrefslogtreecommitdiff
path: root/dht/src/Network/Tox/Session.hs
diff options
context:
space:
mode:
Diffstat (limited to 'dht/src/Network/Tox/Session.hs')
-rw-r--r--dht/src/Network/Tox/Session.hs9
1 files changed, 4 insertions, 5 deletions
diff --git a/dht/src/Network/Tox/Session.hs b/dht/src/Network/Tox/Session.hs
index d34dfc7a..53d63287 100644
--- a/dht/src/Network/Tox/Session.hs
+++ b/dht/src/Network/Tox/Session.hs
@@ -106,14 +106,13 @@ sClose s = do
106-- negotiated. It always returns Nothing which makes it convenient to use with 106-- negotiated. It always returns Nothing which makes it convenient to use with
107-- 'Network.QueryResponse.addHandler'. 107-- 'Network.QueryResponse.addHandler'.
108handshakeH :: SessionParams 108handshakeH :: SessionParams
109 -> Multi.SessionAddress 109 -> Arrival err Multi.SessionAddress (Handshake Encrypted)
110 -> Handshake Encrypted 110 -> STM (Arrival err Multi.SessionAddress (Handshake Encrypted), IO ())
111 -> IO (Maybe a) 111handshakeH sp (Arrival saddr handshake) = return $ (,) Discarded $ do
112handshakeH sp saddr handshake = do
113 decryptHandshake (spCrypto sp) handshake 112 decryptHandshake (spCrypto sp) handshake
114 >>= either (\err -> return ()) 113 >>= either (\err -> return ())
115 (uncurry $ plainHandshakeH sp saddr) 114 (uncurry $ plainHandshakeH sp saddr)
116 return Nothing 115handshakeH _ m = return (m, return ())
117 116
118 117
119plainHandshakeH :: SessionParams 118plainHandshakeH :: SessionParams