diff options
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -81,12 +81,12 @@ static bool client_socket_callback(int fd){ ssize_t ret; do ret=read(fd,data->buffer+data->buflen,data->bufsz-data->buflen); while(ret<0&&errno==EINTR); - if(ret<0)die_perror("read"); - if(ret==0){ + if(ret==0||(ret<0&&(errno==ECONNRESET||errno==ETIMEDOUT))){ delete_conn_data(fd); close(fd); return true; } + if(ret<0)die_perror("read"); data->buflen+=ret; while(true){ |