mirror of https://git.kore.io/kore.git
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->fd = -1;
|
||||||
|
sock->event.evt.handle(&sock->event, 1);
|
||||||
|
|
||||||
Py_RETURN_TRUE;
|
Py_RETURN_TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue