Fix EOF handling with WebSockets
This commit is contained in:
parent
d8fcb22daf
commit
3002fb32b0
|
@ -3238,9 +3238,17 @@ on_tty_readable (EV_P_ ev_io *handle, int revents)
|
||||||
{
|
{
|
||||||
(void) handle;
|
(void) handle;
|
||||||
|
|
||||||
|
static bool readline_reentrancy_lock;
|
||||||
|
if (readline_reentrancy_lock)
|
||||||
|
return;
|
||||||
|
|
||||||
struct app_context *ctx = ev_userdata (loop);
|
struct app_context *ctx = ev_userdata (loop);
|
||||||
if (revents & EV_READ)
|
if (revents & EV_READ)
|
||||||
|
{
|
||||||
|
readline_reentrancy_lock = true;
|
||||||
ctx->input->vtable->on_tty_readable (ctx->input);
|
ctx->input->vtable->on_tty_readable (ctx->input);
|
||||||
|
readline_reentrancy_lock = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in New Issue