summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Crayne <joe@jerkface.net>2020-01-17 05:27:02 -0500
committerJoe Crayne <joe@jerkface.net>2020-01-17 05:27:12 -0500
commitdaeaa4fd91bce1626d126628a2f04d7653c8069a (patch)
treefe03aff24185b017b3717a5bb4d6d0f59d7739be
parent17c32ae0dcb1c10cfd3b82ceaf10ca5d3990b10b (diff)
Send KillPacket when session terminates.
-rw-r--r--dht/src/Network/Tox/Session.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/dht/src/Network/Tox/Session.hs b/dht/src/Network/Tox/Session.hs
index 9bd12c69..cbb516a7 100644
--- a/dht/src/Network/Tox/Session.hs
+++ b/dht/src/Network/Tox/Session.hs
@@ -94,7 +94,9 @@ sTheirUserKey s = longTermKey $ runIdentity cookie
94 94
95-- | Helper to close the 'Transport' associated with a session. 95-- | Helper to close the 'Transport' associated with a session.
96sClose :: Session -> IO () 96sClose :: Session -> IO ()
97sClose s = closeTransport (sTransport s) 97sClose s = do
98 sendMessage (sTransport s) () (Pkt KillPacket ==> ())
99 closeTransport (sTransport s)
98 100
99 101
100-- | Call this whenever a new handshake arrives so that a session is 102-- | Call this whenever a new handshake arrives so that a session is