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:
Joris Vink 2021-12-02 22:47:17 +01:00
parent 5ac62b17bc
commit a9ee15bff6
1 changed files with 1 additions and 0 deletions

View File

@ -3197,6 +3197,7 @@ pysocket_close(struct pysocket *sock, PyObject *args)
}
sock->fd = -1;
sock->event.evt.handle(&sock->event, 1);
Py_RETURN_TRUE;
}