shrpx: Fix client mode does not work
This commit is contained in:
parent
18dc6384d4
commit
ceba5539a1
13
src/shrpx.cc
13
src/shrpx.cc
|
@ -236,11 +236,16 @@ namespace {
|
||||||
int event_loop()
|
int event_loop()
|
||||||
{
|
{
|
||||||
event_base *evbase = event_base_new();
|
event_base *evbase = event_base_new();
|
||||||
|
SSL_CTX *sv_ssl_ctx, *cl_ssl_ctx;
|
||||||
|
|
||||||
SSL_CTX *sv_ssl_ctx = get_config()->default_ssl_ctx;
|
if(get_config()->client_mode) {
|
||||||
SSL_CTX *cl_ssl_ctx = (get_config()->client_mode ||
|
sv_ssl_ctx = 0;
|
||||||
get_config()->spdy_bridge)?
|
cl_ssl_ctx = ssl::create_ssl_client_context();
|
||||||
ssl::create_ssl_client_context() : 0;
|
} else {
|
||||||
|
sv_ssl_ctx = get_config()->default_ssl_ctx;
|
||||||
|
cl_ssl_ctx = get_config()->spdy_bridge ?
|
||||||
|
ssl::create_ssl_client_context() : 0;
|
||||||
|
}
|
||||||
|
|
||||||
ListenHandler *listener_handler = new ListenHandler(evbase, sv_ssl_ctx,
|
ListenHandler *listener_handler = new ListenHandler(evbase, sv_ssl_ctx,
|
||||||
cl_ssl_ctx);
|
cl_ssl_ctx);
|
||||||
|
|
Loading…
Reference in New Issue