From d41881596df59f0024dffd86e1cd4bc71d128a7b Mon Sep 17 00:00:00 2001 From: Job Evers-Meltzer Date: Fri, 11 Nov 2016 10:21:50 -0600 Subject: [PATCH] Restore reactor.iterate in dht shutdown This reverts the change made in 693fef1964e281eaf7b39f9bd9f5728406942a14 Not sure why this is needed, but taking this out sometimes causes `exceptions.AttributeError: 'Port' object has no attribute 'socket'` to happen on shutdown. --- lbrynet/dht/protocol.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lbrynet/dht/protocol.py b/lbrynet/dht/protocol.py index 37c855c50..02f322698 100644 --- a/lbrynet/dht/protocol.py +++ b/lbrynet/dht/protocol.py @@ -321,3 +321,7 @@ class KademliaProtocol(protocol.DatagramProtocol): except Exception, e: log.exception('Failed to cancel %s', self._callLaterList[key]) del self._callLaterList[key] + # not sure why this is needed, but taking this out sometimes causes + # exceptions.AttributeError: 'Port' object has no attribute 'socket' + # to happen on shutdown + reactor.iterate()