diff options
author | Joe Crayne <joe@jerkface.net> | 2020-01-17 05:27:02 -0500 |
---|---|---|
committer | Joe Crayne <joe@jerkface.net> | 2020-01-17 05:27:12 -0500 |
commit | daeaa4fd91bce1626d126628a2f04d7653c8069a (patch) | |
tree | fe03aff24185b017b3717a5bb4d6d0f59d7739be | |
parent | 17c32ae0dcb1c10cfd3b82ceaf10ca5d3990b10b (diff) |
Send KillPacket when session terminates.
-rw-r--r-- | dht/src/Network/Tox/Session.hs | 4 |
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. |
96 | sClose :: Session -> IO () | 96 | sClose :: Session -> IO () |
97 | sClose s = closeTransport (sTransport s) | 97 | sClose 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 |