diff options
Diffstat (limited to 'src/os/unix/ngx_channel.c')
-rw-r--r-- | src/os/unix/ngx_channel.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/os/unix/ngx_channel.c b/src/os/unix/ngx_channel.c index ff0aeccb0..01416d6ab 100644 --- a/src/os/unix/ngx_channel.c +++ b/src/os/unix/ngx_channel.c @@ -194,6 +194,13 @@ ngx_int_t ngx_add_channel_event(ngx_cycle_t *cycle, ngx_fd_t fd, rev->data = c; wev->data = c; +#if (NGX_THREADS) + rev->lock = &c->lock; + wev->lock = &c->lock; + rev->own_lock = &c->lock; + wev->own_lock = &c->lock; +#endif + ev = (event == NGX_READ_EVENT) ? rev : wev; ev->event_handler = handler; |