Browse code

tcpclose event_routes issue

Viktor authored on 20/12/2021 11:44:06 • Daniel-Constantin Mierla committed on 07/01/2022 11:23:41
Showing 1 changed files
... ...
@@ -3649,7 +3649,7 @@ inline static int handle_tcp_child(struct tcp_child* tcp_c, int fd_i)
3649 3649
 				/* if refcnt was 1 => it was used only in the
3650 3650
 				   tcp reader => it's not hashed or watched for IO
3651 3651
 				   anymore => no need to io_watch_del() */
3652
-				tcp_emit_closed_event(c, TCP_CLOSED_EOF);
3652
+				tcp_emit_closed_event(tcpconn, TCP_CLOSED_EOF);
3653 3653
 				tcpconn_destroy(tcpconn);
3654 3654
 				break;
3655 3655
 			}
... ...
@@ -3661,7 +3661,7 @@ inline static int handle_tcp_child(struct tcp_child* tcp_c, int fd_i)
3661 3661
 						tcpconn->flags &= ~F_CONN_WRITE_W;
3662 3662
 					}
3663 3663
 #endif /* TCP_ASYNC */
3664
-					tcp_emit_closed_event(c, TCP_CLOSED_EOF);
3664
+					tcp_emit_closed_event(tcpconn, TCP_CLOSED_EOF);
3665 3665
 					tcpconn_put_destroy(tcpconn);
3666 3666
 				}
3667 3667
 #ifdef TCP_ASYNC
... ...
@@ -3713,7 +3713,7 @@ inline static int handle_tcp_child(struct tcp_child* tcp_c, int fd_i)
3713 3713
 							io_watch_del(&io_h, tcpconn->s, -1, IO_FD_CLOSING);
3714 3714
 							tcpconn->flags&=~F_CONN_WRITE_W;
3715 3715
 						}
3716
-						tcp_emit_closed_event(c, TCP_CLOSED_EOF);
3716
+						tcp_emit_closed_event(tcpconn, TCP_CLOSED_EOF);
3717 3717
 						tcpconn_put_destroy(tcpconn);
3718 3718
 					} else if (unlikely(tcpconn->flags & F_CONN_WRITE_W)){
3719 3719
 						BUG("unhashed connection watched for write\n");
... ...
@@ -3750,7 +3750,7 @@ inline static int handle_tcp_child(struct tcp_child* tcp_c, int fd_i)
3750 3750
 						tcpconn->flags&=~F_CONN_WRITE_W;
3751 3751
 					}
3752 3752
 #endif /* TCP_ASYNC */
3753
-					tcp_emit_closed_event(c, TCP_CLOSED_EOF);
3753
+					tcp_emit_closed_event(tcpconn, TCP_CLOSED_EOF);
3754 3754
 					tcpconn_put_destroy(tcpconn);
3755 3755
 				}
3756 3756
 #ifdef TCP_ASYNC
... ...
@@ -3782,7 +3782,7 @@ inline static int handle_tcp_child(struct tcp_child* tcp_c, int fd_i)
3782 3782
 #endif /* TCP_ASYNC */
3783 3783
 				if (tcpconn_try_unhash(tcpconn))
3784 3784
 					tcpconn_put(tcpconn);
3785
-				tcp_emit_closed_event(c, TCP_CLOSED_EOF);
3785
+				tcp_emit_closed_event(tcpconn, TCP_CLOSED_EOF);
3786 3786
 				tcpconn_put_destroy(tcpconn); /* deref & delete if refcnt==0 */
3787 3787
 				break;
3788 3788
 		default: