Skip to content

Commit a4d5fae

Browse files
committed
Fix condition.
1 parent 013cab0 commit a4d5fae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/httpserver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ void on_read(uv_stream_t* tcp, ssize_t nread, uv_buf_t buf) {
113113
DPRINTF("parse error::nread:%d, parsed: %d\n", nread, parsed);
114114
close_connection(client);
115115
}
116-
} else {
116+
} else if (nread < 0) {
117117
uv_err_t err = uv_last_error(uv_loop);
118118
if (err.code != UV_EOF) {
119119
UVERR(err, "read");

0 commit comments

Comments
 (0)