Skip to content

Commit

Permalink
net_tcp_proc: close a socket received for writing when there is an error
Browse files Browse the repository at this point in the history
  • Loading branch information
jes authored and sobomax committed Nov 15, 2023
1 parent 8f32842 commit bffcf00
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/net_tcp_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ inline static int handle_io(struct fd_map* fm, int idx,int event_type)
"handle write, err, state: %d, att: %d",
con->state, con->msg_attempts);
tcpconn_release_error(con, 1,"Write error");
close(s); /* we always close the socket received for writing */
break;
} else if (resp==1) {
sh_log(con->hist, TCP_SEND2MAIN,
Expand Down

0 comments on commit bffcf00

Please sign in to comment.