From 06bc74fb8fccb4b8a19d7a204df79c222791e677 Mon Sep 17 00:00:00 2001 From: Joe Crayne Date: Sat, 30 Nov 2019 19:34:26 -0500 Subject: Debug print upon toxid garbage collection. --- dht/src/Network/Tox/Onion/Handlers.hs | 1 + dht/src/Network/Tox/TCP.hs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'dht/src/Network') diff --git a/dht/src/Network/Tox/Onion/Handlers.hs b/dht/src/Network/Tox/Onion/Handlers.hs index f44dd79c..25713aa1 100644 --- a/dht/src/Network/Tox/Onion/Handlers.hs +++ b/dht/src/Network/Tox/Onion/Handlers.hs @@ -181,6 +181,7 @@ forkAnnouncedKeysGC db = forkIO $ do fix $ \loop -> do cutoff <- getPOSIXTime threadDelay 300000000 -- 300 seconds + dput XAnnounce "(gc:toxids) Garbage collecting announced toxids." join $ atomically $ do fix $ \gc -> do keys <- readTVar db diff --git a/dht/src/Network/Tox/TCP.hs b/dht/src/Network/Tox/TCP.hs index 5dfb8382..d0d67f25 100644 --- a/dht/src/Network/Tox/TCP.hs +++ b/dht/src/Network/Tox/TCP.hs @@ -304,7 +304,7 @@ newClient crypto store load = do PingPacket -> trace ("tcp-received-ping") $ Just MethodHandler { methodParse = \case (_,RelayPing n8) -> Right () _ -> trace ("tcp-non-ping") $ Left "TCP: Non-ping?" - , methodSerialize = \n8 src dst () -> trace ("tcp-made-pong-"++show n8) (False, RelayPong n8) + , methodSerialize = \n8 src dst () -> {- trace ("tcp-made-pong-"++show n8) -} (False, RelayPong n8) , methodAction = \src () -> dput XTCP $ "TCP pinged by "++show src } w -> trace ("tcp-lookupHandler: "++show w) $ Just NoReply -- cgit v1.2.3