mirror of
https://github.com/jorisvink/kore
synced 2025-03-09 04:29:02 -04:00
Improve closing of a kore.socket() in Python API.
When a kore.socket() is closed from any coroutine, make sure any other coroutines waiting on events on the socket are awoken so they properly can return errors.
This commit is contained in:
parent
5ac62b17bc
commit
a9ee15bff6
@ -3197,6 +3197,7 @@ pysocket_close(struct pysocket *sock, PyObject *args)
|
||||
}
|
||||
|
||||
sock->fd = -1;
|
||||
sock->event.evt.handle(&sock->event, 1);
|
||||
|
||||
Py_RETURN_TRUE;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user