Remove from recent peers of peer remove

This commit is contained in:
shortcutme 2018-02-08 18:07:09 +01:00
parent a6e67fa9c3
commit 403ec56ef8
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -329,6 +329,10 @@ class Peer(object):
self.log("Removing peer...Connection error: %s, Hash failed: %s" % (self.connection_error, self.hash_failed))
if self.site and self.key in self.site.peers:
del(self.site.peers[self.key])
if self.site and self in self.site.peers_recent:
self.site.peers_recent.remove(self)
if self.connection:
self.connection.close(reason)