nghttpx: Fix server error with -n1 and --tls-ctx-per-worker
This commit is contained in:
parent
1e4f8f27fd
commit
5e8eb926f2
16
src/shrpx.cc
16
src/shrpx.cc
|
@ -542,16 +542,18 @@ int event_loop() {
|
||||||
}
|
}
|
||||||
#endif // !NOTHREADS
|
#endif // !NOTHREADS
|
||||||
|
|
||||||
if (!get_config()->tls_ctx_per_worker) {
|
|
||||||
conn_handler->create_ssl_context();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (get_config()->num_worker > 1) {
|
if (get_config()->num_worker > 1) {
|
||||||
|
if (!get_config()->tls_ctx_per_worker) {
|
||||||
|
conn_handler->create_ssl_context();
|
||||||
|
}
|
||||||
conn_handler->create_worker_thread(get_config()->num_worker);
|
conn_handler->create_worker_thread(get_config()->num_worker);
|
||||||
} else if (get_config()->downstream_proto == PROTO_HTTP2) {
|
|
||||||
conn_handler->create_http2_session();
|
|
||||||
} else {
|
} else {
|
||||||
conn_handler->create_http1_connect_blocker();
|
conn_handler->create_ssl_context();
|
||||||
|
if (get_config()->downstream_proto == PROTO_HTTP2) {
|
||||||
|
conn_handler->create_http2_session();
|
||||||
|
} else {
|
||||||
|
conn_handler->create_http1_connect_blocker();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NOTHREADS
|
#ifndef NOTHREADS
|
||||||
|
|
Loading…
Reference in New Issue