diff options
Diffstat (limited to 'sysdep/unix/main.c')
-rw-r--r-- | sysdep/unix/main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c index 621d85ca..06d1d1dc 100644 --- a/sysdep/unix/main.c +++ b/sysdep/unix/main.c @@ -179,9 +179,10 @@ cli_write(cli *c) struct cli_out *o = c->tx_pos; c->tx_pos = o->next; s->tbuf = o->outpos; - return sk_send(s, o->wpos - o->outpos); + if (sk_send(s, o->wpos - o->outpos) > 0) + ev_schedule(c->event); } - return 1; + return !c->tx_pos; } int |