Explorar o código

core: tcp - reset connection write flag if io_watch_chg() for pollout fails

- it can loop otherwise in trying to see if write can be done
Daniel-Constantin Mierla %!s(int64=10) %!d(string=hai) anos
pai
achega
d36734d658
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      tcp_main.c

+ 1 - 0
tcp_main.c

@@ -4113,6 +4113,7 @@ inline static int handle_tcpconn_ev(struct tcp_connection* tcpconn, short ev,
 			if (unlikely(io_watch_chg(&io_h, tcpconn->s, POLLOUT, fd_i)==-1)){
 				LM_ERR("io_watch_chg(2) failed: for %p, fd %d\n",
 							tcpconn, tcpconn->s);
+				tcpconn->flags&=~F_CONN_WRITE_W;
 				goto error;
 			}
 		}else