Przeglądaj źródła

tcp: killed warning

Killed warning for the case when a connection is force closed on
purpose (via set_reply_close()).
Andrei Pelinescu-Onciul 16 lat temu
rodzic
commit
33c8757246
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      tcp_read.c

+ 2 - 1
tcp_read.c

@@ -964,7 +964,8 @@ again:
 			con=(struct tcp_connection*)fm->data;
 			con=(struct tcp_connection*)fm->data;
 			if (unlikely(con->state==S_CONN_BAD)){
 			if (unlikely(con->state==S_CONN_BAD)){
 				resp=CONN_ERROR;
 				resp=CONN_ERROR;
-				LOG(L_WARN, "WARNING: tcp_receive: handle_io: F_TCPCONN"
+				if (!(con->send_flags & SND_F_CON_CLOSE))
+					LOG(L_WARN, "WARNING: tcp_receive: handle_io: F_TCPCONN"
 							" connection marked as bad: %p id %d refcnt %d\n",
 							" connection marked as bad: %p id %d refcnt %d\n",
 							con, con->id, atomic_get(&con->refcnt));
 							con, con->id, atomic_get(&con->refcnt));
 				goto read_error;
 				goto read_error;