diff options
Diffstat (limited to 'src/nxt_openssl.c')
-rw-r--r-- | src/nxt_openssl.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/nxt_openssl.c b/src/nxt_openssl.c index 99dd2077..c01f92c8 100644 --- a/src/nxt_openssl.c +++ b/src/nxt_openssl.c @@ -855,12 +855,11 @@ nxt_openssl_conn_test_error(nxt_task_t *task, nxt_conn_t *c, int ret, switch (tls->ssl_error) { case SSL_ERROR_WANT_READ: + c->socket.read_ready = 0; if (io != NXT_OPENSSL_READ) { nxt_fd_event_block_write(task->thread->engine, &c->socket); - c->socket.read_ready = 0; - if (nxt_fd_event_is_disabled(c->socket.read)) { nxt_fd_event_enable_read(task->thread->engine, &c->socket); } @@ -869,12 +868,11 @@ nxt_openssl_conn_test_error(nxt_task_t *task, nxt_conn_t *c, int ret, return NXT_AGAIN; case SSL_ERROR_WANT_WRITE: + c->socket.write_ready = 0; if (io != NXT_OPENSSL_WRITE) { nxt_fd_event_block_read(task->thread->engine, &c->socket); - c->socket.write_ready = 0; - if (nxt_fd_event_is_disabled(c->socket.write)) { nxt_fd_event_enable_write(task->thread->engine, &c->socket); } |