summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Network.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Network.hs b/src/Network.hs
index 44f27e7..198efb0 100644
--- a/src/Network.hs
+++ b/src/Network.hs
@@ -106,7 +106,7 @@ peerDiscovery bhost sidentity = do
packet _ sock peer (AnnouncePacket ref) _ = do
putStrLn $ "Got announce: " ++ show ref ++ " from " ++ show peer
- void $ sendTo sock (BL.toStrict $ BL.concat
+ when (ref /= storedRef sidentity) $ void $ sendTo sock (BL.toStrict $ BL.concat
[ serializeObject $ transportToObject $ IdentityRequest ref (storedRef sidentity)
, lazyLoadBytes $ storedRef sidentity
, lazyLoadBytes $ storedRef $ signedData $ fromStored sidentity