fix ping queue bug

This commit is contained in:
Jack Robison 2018-08-23 11:17:29 -04:00
parent 2c546b2cde
commit 37ddaeca12
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -73,8 +73,10 @@ class PingQueue(object):
yield defer.DeferredList([_ping(contact) for contact in pinged])
for contact in checked:
if contact in self._enqueued_contacts:
if contact in self._enqueued_contacts and contact in pinged:
del self._enqueued_contacts[contact]
elif contact not in self._queue:
self._queue.appendleft(contact)
defer.returnValue(None)