summaryrefslogtreecommitdiff
path: root/examples/dhtd.hs
diff options
context:
space:
mode:
authorjim@bo <jim@bo>2018-06-24 18:50:44 -0400
committerjim@bo <jim@bo>2018-06-24 18:50:44 -0400
commit47637306b8c19b0b7363f9a2642c7190470a2c93 (patch)
tree070565ea9211ef7f782b736458ba1acc129493ea /examples/dhtd.hs
parenta5fad52f1e1ca6d8ebfcbb448f19014225368777 (diff)
call setTerminated from destroySession
Diffstat (limited to 'examples/dhtd.hs')
-rw-r--r--examples/dhtd.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/dhtd.hs b/examples/dhtd.hs
index bf7d7162..f4a2544c 100644
--- a/examples/dhtd.hs
+++ b/examples/dhtd.hs
@@ -1734,7 +1734,9 @@ main = do
1734 keysdb <- Tox.newKeysDatabase 1734 keysdb <- Tox.newKeysDatabase
1735 1735
1736 _crypto <- Tox.newCrypto 1736 _crypto <- Tox.newCrypto
1737 _netCryptoSessionsState <- Tox.newSessionsState _crypto Tox.defaultUnRecHook Tox.defaultCryptoDataHooks 1737 let emptyDestroyHook :: Tox.NetCryptoSession -> IO ()
1738 emptyDestroyHook session = dput XNetCrypto $ "SESSION DESTROY HOOK NOT ADDED ! publkey= " ++ show (Tox.key2id (Tox.ncTheirPublicKey session))
1739 _netCryptoSessionsState <- Tox.newSessionsState _crypto emptyDestroyHook Tox.defaultUnRecHook Tox.defaultCryptoDataHooks
1738 (mbtox,quitTox,toxdhts,toxips,(taddrs::[SockAddr])) <- case porttox opts of 1740 (mbtox,quitTox,toxdhts,toxips,(taddrs::[SockAddr])) <- case porttox opts of
1739 "" -> return (Nothing,return (), Map.empty, return [],[]) 1741 "" -> return (Nothing,return (), Map.empty, return [],[])
1740 toxport -> do 1742 toxport -> do