Skip to content

Commit

Permalink
fix: free http con when ssl_read return 0.
Browse files Browse the repository at this point in the history
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
  • Loading branch information
zhaojh329 committed Nov 21, 2024
1 parent edd50a6 commit ca5207b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ static void on_net_read(struct ev_loop *loop, struct ev_io *w, int revents)
}
if (ret == SSL_WANT_READ || ret == SSL_WANT_WRITE)
return;

if (ret == 0)
goto done;
} else {
#endif
ret = read(w->fd, buf, sizeof(buf));
Expand Down

0 comments on commit ca5207b

Please sign in to comment.