Skip to content

Commit

Permalink
del → dict.pop
Browse files Browse the repository at this point in the history
Fixes #259
  • Loading branch information
IlyaSkriblovsky committed May 21, 2020
1 parent 1a1ee6e commit c2bcf8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions txmongo/connection.py
Expand Up @@ -422,12 +422,12 @@ def __discovery_nodes_to_ping(self):

for unused_peer in existing - peers:
self.__pingers[unused_peer].connector.disconnect()
del self.__pingers[unused_peer]
self.__pingers.pop(unused_peer, None)

def __on_ping_lost(self, addr):
if addr in self.__pingers:
self.__pingers[addr].connector.disconnect()
del self.__pingers[addr]
self.__pingers.pop(addr, None)

def __on_ping_fail(self, addr):
# Kill all pool connections to this addr
Expand Down

0 comments on commit c2bcf8f

Please sign in to comment.