mirror of
https://github.com/zotanmew/nginx-rtmp-module.git
synced 2024-06-01 22:29:32 +02:00
implemented better checks for upstream connect result
This commit is contained in:
parent
1051367274
commit
5722ad5761
|
@ -169,6 +169,7 @@ ngx_rtmp_netcall_create(ngx_rtmp_session_t *s, ngx_rtmp_netcall_init_t *ci)
|
||||||
ngx_rtmp_netcall_app_conf_t *cacf;
|
ngx_rtmp_netcall_app_conf_t *cacf;
|
||||||
ngx_connection_t *c, *cc;
|
ngx_connection_t *c, *cc;
|
||||||
ngx_pool_t *pool;
|
ngx_pool_t *pool;
|
||||||
|
ngx_int_t rc;
|
||||||
|
|
||||||
pool = NULL;
|
pool = NULL;
|
||||||
c = s->connection;
|
c = s->connection;
|
||||||
|
@ -232,10 +233,10 @@ ngx_rtmp_netcall_create(ngx_rtmp_session_t *s, ngx_rtmp_netcall_init_t *ci)
|
||||||
pc->data = cs;
|
pc->data = cs;
|
||||||
|
|
||||||
/* connect */
|
/* connect */
|
||||||
if (ngx_event_connect_peer(pc) == NGX_ERROR) {
|
rc = ngx_event_connect_peer(pc);
|
||||||
|
if (rc != NGX_OK && rc != NGX_AGAIN ) {
|
||||||
ngx_log_debug0(NGX_LOG_DEBUG_RTMP, s->connection->log, 0,
|
ngx_log_debug0(NGX_LOG_DEBUG_RTMP, s->connection->log, 0,
|
||||||
"netcall: connection failed");
|
"netcall: connection failed");
|
||||||
ngx_close_connection(pc->connection);
|
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue