diff -r aa8393527b1e -r 6345f50208d5 src/server/daemon/sessionhandler.c --- a/src/server/daemon/sessionhandler.c Sat Jan 13 19:01:00 2018 +0100 +++ b/src/server/daemon/sessionhandler.c Sun Jan 14 10:38:09 2018 +0100 @@ -260,7 +260,7 @@ Event *event = malloc(sizeof(Event)); ZERO(event, sizeof(Event)); - event->fn = conn->ssl ? evt_request_ssl_accept : evt_request_input; + event->fn = conn->ssl && !conn->ssl_accepted ? evt_request_ssl_accept : evt_request_input; event->finish = evt_request_finish; event->cookie = io; @@ -305,6 +305,7 @@ return 0; } } + conn->ssl_accepted = WS_TRUE; // SSL_accept successful, start request input now event->fn = evt_request_input;