Module: kamailio
Branch: master
Commit: d36734d658cd0bcfc8357c7e85ca32da0612aaee
URL:
https://github.com/kamailio/kamailio/commit/d36734d658cd0bcfc8357c7e85ca32d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-09-22T15:22:32+02:00
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
---
Modified: tcp_main.c
---
Diff:
https://github.com/kamailio/kamailio/commit/d36734d658cd0bcfc8357c7e85ca32d…
Patch:
https://github.com/kamailio/kamailio/commit/d36734d658cd0bcfc8357c7e85ca32d…
---
diff --git a/tcp_main.c b/tcp_main.c
index df778ba..578f7d2 100644
--- a/tcp_main.c
+++ b/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