Browse code

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 authored on 22/09/2015 13:22:32
Showing 1 changed files
... ...
@@ -4113,6 +4113,7 @@ inline static int handle_tcpconn_ev(struct tcp_connection* tcpconn, short ev,
4113 4113
 			if (unlikely(io_watch_chg(&io_h, tcpconn->s, POLLOUT, fd_i)==-1)){
4114 4114
 				LM_ERR("io_watch_chg(2) failed: for %p, fd %d\n",
4115 4115
 							tcpconn, tcpconn->s);
4116
+				tcpconn->flags&=~F_CONN_WRITE_W;
4116 4117
 				goto error;
4117 4118
 			}
4118 4119
 		}else