Skip to content

Commit 110c57c

Browse files
committed
uasyncio: do not raise an exception when trying to remove a non-existing reader
1 parent a5eaaab commit 110c57c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

uasyncio/uasyncio/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def remove_reader(self, sock):
3636
if DEBUG and __debug__:
3737
log.debug("remove_reader(%s)", sock)
3838
self.poller.unregister(sock)
39-
del self.objmap[id(sock)]
39+
self.objmap.pop(id(sock), None)
4040

4141
def add_writer(self, sock, cb, *args):
4242
if DEBUG and __debug__:

0 commit comments

Comments
 (0)