Skip to content

Commit

Permalink
ngx_event.c
Browse files Browse the repository at this point in the history
  • Loading branch information
chronolaw committed Dec 18, 2016
1 parent 9afccf0 commit c5d59df
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nginx/src/event/ngx_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -949,6 +949,7 @@ ngx_event_process_init(ngx_cycle_t *cycle)
}
}

// poll, /dev/poll进入这个分支处理
if (ngx_event_flags & NGX_USE_FD_EVENT) {
struct rlimit rlmt;

Expand Down Expand Up @@ -1067,9 +1068,12 @@ ngx_event_process_init(ngx_cycle_t *cycle)
c->type = ls[i].type;
c->log = &ls[i].log;

// 连接的listening对象
// 两者相互连接
c->listening = &ls[i];
ls[i].connection = c;

// 监听端口只关心读事件
rev = c->read;

rev->log = c->log;
Expand Down

0 comments on commit c5d59df

Please sign in to comment.