mirror of
https://github.com/tmate-io/tmate.git
synced 2024-11-08 09:14:22 +01:00
An EOF is a good reason to close a connection.
ok nicm@
This commit is contained in:
parent
f117c7d94a
commit
2b67907176
2
client.c
2
client.c
@ -469,7 +469,7 @@ client_callback(unused int fd, short events, void *data)
|
||||
}
|
||||
|
||||
if (events & EV_WRITE) {
|
||||
if (msgbuf_write(&client_ibuf.w) < 0 && errno != EAGAIN)
|
||||
if (msgbuf_write(&client_ibuf.w) <= 0 && errno != EAGAIN)
|
||||
goto lost_server;
|
||||
}
|
||||
|
||||
|
@ -224,7 +224,7 @@ server_client_callback(int fd, short events, void *data)
|
||||
return;
|
||||
|
||||
if (fd == c->ibuf.fd) {
|
||||
if (events & EV_WRITE && msgbuf_write(&c->ibuf.w) < 0 &&
|
||||
if (events & EV_WRITE && msgbuf_write(&c->ibuf.w) <= 0 &&
|
||||
errno != EAGAIN)
|
||||
goto client_lost;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user