From cbccd06babfc66ab920e7e2331d125516715f709 Mon Sep 17 00:00:00 2001 From: Roman Arutyunyan Date: Thu, 27 Dec 2012 17:19:54 +0400 Subject: [PATCH] async client handshake switched to posted events --- ngx_rtmp_handshake.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ngx_rtmp_handshake.c b/ngx_rtmp_handshake.c index 910c28f..171eee6 100644 --- a/ngx_rtmp_handshake.c +++ b/ngx_rtmp_handshake.c @@ -379,7 +379,7 @@ ngx_rtmp_handshake_recv(ngx_event_t *rev) if (rev->timedout) { ngx_log_error(NGX_LOG_INFO, c->log, NGX_ETIMEDOUT, - "handshake: client timed out"); + "handshake: recv: client timed out"); c->timedout = 1; ngx_rtmp_finalize_session(s); return; @@ -494,7 +494,7 @@ ngx_rtmp_handshake_send(ngx_event_t *wev) if (wev->timedout) { ngx_log_error(NGX_LOG_INFO, c->log, NGX_ETIMEDOUT, - "handshake: client timed out"); + "handshake: send: client timed out"); c->timedout = 1; ngx_rtmp_finalize_session(s); return; @@ -609,10 +609,7 @@ ngx_rtmp_client_handshake(ngx_rtmp_session_t *s, unsigned async) } if (async) { - ngx_add_timer(c->write, s->timeout); - if (ngx_handle_write_event(c->write, 0) != NGX_OK) { - ngx_rtmp_finalize_session(s); - } + ngx_post_event(c->write, &ngx_posted_events); return; }