Module: kamailio
Branch: 4.3
Commit: 71e7e92aeed8acb058e4064a1369f52bd612479f
URL:
https://github.com/kamailio/kamailio/commit/71e7e92aeed8acb058e4064a1369f52…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-09-22T16:32:29+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
(cherry picked from commit d36734d658cd0bcfc8357c7e85ca32da0612aaee)
---
Modified: tcp_main.c
---
Diff:
https://github.com/kamailio/kamailio/commit/71e7e92aeed8acb058e4064a1369f52…
Patch:
https://github.com/kamailio/kamailio/commit/71e7e92aeed8acb058e4064a1369f52…
---
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