mirror of
https://github.com/janet-lang/janet
synced 2024-11-28 19:19:53 +00:00
Fix #610 - POLLHUP should cause us to continue reading.
This commit is contained in:
parent
0b14e913da
commit
a2801fbef9
@ -1614,8 +1614,7 @@ JanetAsyncStatus ev_machine_read(JanetListenerState *s, JanetAsyncEvent event) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#else
|
#else
|
||||||
case JANET_ASYNC_EVENT_ERR:
|
case JANET_ASYNC_EVENT_ERR: {
|
||||||
case JANET_ASYNC_EVENT_HUP: {
|
|
||||||
if (state->bytes_read) {
|
if (state->bytes_read) {
|
||||||
janet_schedule(s->fiber, janet_wrap_buffer(state->buf));
|
janet_schedule(s->fiber, janet_wrap_buffer(state->buf));
|
||||||
} else {
|
} else {
|
||||||
@ -1623,6 +1622,7 @@ JanetAsyncStatus ev_machine_read(JanetListenerState *s, JanetAsyncEvent event) {
|
|||||||
}
|
}
|
||||||
return JANET_ASYNC_STATUS_DONE;
|
return JANET_ASYNC_STATUS_DONE;
|
||||||
}
|
}
|
||||||
|
case JANET_ASYNC_EVENT_HUP:
|
||||||
case JANET_ASYNC_EVENT_READ: {
|
case JANET_ASYNC_EVENT_READ: {
|
||||||
JanetBuffer *buffer = state->buf;
|
JanetBuffer *buffer = state->buf;
|
||||||
int32_t bytes_left = state->bytes_left;
|
int32_t bytes_left = state->bytes_left;
|
||||||
|
Loading…
Reference in New Issue
Block a user