nghttpx: Make socketpair in internal use non-block
This commit is contained in:
parent
a61ca763df
commit
ddfa93ff5b
|
@ -196,6 +196,8 @@ int Http2Session::init_notification()
|
|||
SSLOG(FATAL, this) << "socketpair() failed: errno=" << errno;
|
||||
return -1;
|
||||
}
|
||||
evutil_make_socket_nonblocking(sockpair[0]);
|
||||
evutil_make_socket_nonblocking(sockpair[1]);
|
||||
wrbev_ = bufferevent_socket_new(evbase_, sockpair[0],
|
||||
BEV_OPT_CLOSE_ON_FREE|
|
||||
BEV_OPT_DEFER_CALLBACKS);
|
||||
|
|
|
@ -67,6 +67,8 @@ void ListenHandler::create_worker_thread(size_t num)
|
|||
LLOG(ERROR, this) << "socketpair() failed: errno=" << errno;
|
||||
continue;
|
||||
}
|
||||
evutil_make_socket_nonblocking(info->sv[0]);
|
||||
evutil_make_socket_nonblocking(info->sv[1]);
|
||||
info->sv_ssl_ctx = sv_ssl_ctx_;
|
||||
info->cl_ssl_ctx = cl_ssl_ctx_;
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue