Merge branch 'obsd-master'

pull/1050/head
Thomas Adam 2017-08-24 12:01:10 +01:00
commit 1492c9d7d9
1 changed files with 2 additions and 1 deletions

3
tty.c
View File

@ -159,8 +159,9 @@ tty_read_callback(__unused int fd, __unused short events, void *data)
int nread;
nread = evbuffer_read(tty->in, tty->fd, -1);
if (nread == -1) {
if (nread == 0 || nread == -1) {
event_del(&tty->event_in);
server_client_lost(tty->client);
return;
}
log_debug("%s: read %d bytes (already %zu)", c->name, nread, size);