summaryrefslogtreecommitdiff
path: root/examples/dhtd.hs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/dhtd.hs')
-rw-r--r--examples/dhtd.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/dhtd.hs b/examples/dhtd.hs
index f4a2544c..efd51e6d 100644
--- a/examples/dhtd.hs
+++ b/examples/dhtd.hs
@@ -455,7 +455,6 @@ clientSession s@Session{..} sock cnum h = do
455 hPutClient h $ "error." 455 hPutClient h $ "error."
456 456
457 ("stop", _) -> do hPutClient h "Terminating DHT Daemon." 457 ("stop", _) -> do hPutClient h "Terminating DHT Daemon."
458 mapM_ (saveNodes netname) dhts
459 hCloseClient h 458 hCloseClient h
460 signalQuit 459 signalQuit
461 460
@@ -2077,4 +2076,8 @@ main = do
2077 quitTox 2076 quitTox
2078 2077
2079 swarmsdb <- atomically $ readTVar (Mainline.contactInfo swarms) 2078 swarmsdb <- atomically $ readTVar (Mainline.contactInfo swarms)
2079 forM_ (Map.toList dhts) $ \(netname,dht) -> do
2080 saveNodes netname dht
2081 dput XMisc $ "Saved " ++ nodesFileName netname ++ "."
2080 L.writeFile "bt-peers.dat" $ S.encodeLazy swarmsdb 2082 L.writeFile "bt-peers.dat" $ S.encodeLazy swarmsdb
2083 dput XMisc $ "Saved bt-peers.dat"