mirror of
https://github.com/jorisvink/kore
synced 2025-03-09 12:39:01 -04:00
Make sure coros are woken up on eof.
This commit is contained in:
parent
3b4574d791
commit
b06160c768
@ -2255,7 +2255,8 @@ pysocket_evt_handle(void *arg, int eof)
|
||||
struct pysocket_event *event = arg;
|
||||
struct pysocket *socket = event->s;
|
||||
|
||||
if ((event->evt.flags & KORE_EVENT_READ) && socket->recvop != NULL) {
|
||||
if ((eof || (event->evt.flags & KORE_EVENT_READ)) &&
|
||||
socket->recvop != NULL) {
|
||||
if (socket->recvop->coro->request != NULL)
|
||||
http_request_wakeup(socket->recvop->coro->request);
|
||||
else
|
||||
@ -2263,7 +2264,8 @@ pysocket_evt_handle(void *arg, int eof)
|
||||
socket->recvop->eof = eof;
|
||||
}
|
||||
|
||||
if ((event->evt.flags & KORE_EVENT_WRITE) && socket->sendop != NULL) {
|
||||
if ((eof || (event->evt.flags & KORE_EVENT_WRITE)) &&
|
||||
socket->sendop != NULL) {
|
||||
if (socket->sendop->coro->request != NULL)
|
||||
http_request_wakeup(socket->sendop->coro->request);
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user