diff options
author | Igor Sysoev <igor@sysoev.ru> | 2017-12-26 17:31:37 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2017-12-26 17:31:37 +0300 |
commit | 2ab29f6cc305a12d80e4a6f5f525cdef7b5eb47e (patch) | |
tree | 790e49fb521302bec58fc47298a7b5badd2be2a4 /src | |
parent | 95a9cb94d56ab85c0fd7d765d97ae807a9333f9e (diff) | |
download | unit-2ab29f6cc305a12d80e4a6f5f525cdef7b5eb47e.tar.gz unit-2ab29f6cc305a12d80e4a6f5f525cdef7b5eb47e.tar.bz2 |
nxt_conn_close() should disable all pending write operations.
Diffstat (limited to '')
-rw-r--r-- | src/nxt_conn_close.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nxt_conn_close.c b/src/nxt_conn_close.c index dc4a19c8..f70d418e 100644 --- a/src/nxt_conn_close.c +++ b/src/nxt_conn_close.c @@ -30,6 +30,12 @@ nxt_conn_close(nxt_event_engine_t *engine, nxt_conn_t *c) nxt_debug(c->socket.task, "conn close fd:%d, to:%d", c->socket.fd, c->socket.timedout); + /* + * Disable all pending write operations because on success they + * will incorrectly call a ready handler set for nxt_conn_close(). + */ + c->write = NULL; + if (c->socket.timedout) { /* * Resetting of timed out connection on close |