mirror of https://github.com/celery/kombu.git
Use set.discard instead of set.remove
This commit is contained in:
parent
55c72cce04
commit
d6b0c84194
|
@ -309,10 +309,7 @@ class Transport(base.Transport):
|
|||
return channel
|
||||
|
||||
def close_channel(self, channel):
|
||||
try:
|
||||
self._channels.remove(channel)
|
||||
except KeyError:
|
||||
pass
|
||||
self._channels.discard(channel)
|
||||
|
||||
def establish_connection(self):
|
||||
return self # for drain events
|
||||
|
|
Loading…
Reference in New Issue