1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

timeout coverage for ssl accept

Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
Andy Green 2013-01-28 17:20:41 +08:00
parent e21607136c
commit ba85a7dbbd
2 changed files with 6 additions and 0 deletions

View file

@ -267,6 +267,7 @@ enum pending_timeout {
PENDING_TIMEOUT_CLOSE_ACK,
PENDING_TIMEOUT_AWAITING_EXTENSION_CONNECT_RESPONSE,
PENDING_TIMEOUT_SENT_CLIENT_HANDSHAKE,
PENDING_TIMEOUT_SSL_ACCEPT,
};

View file

@ -291,6 +291,9 @@ int lws_server_socket_service(struct libwebsocket_context *context,
wsi->mode = LWS_CONNMODE_SSL_ACK_PENDING;
insert_wsi_socket_into_fds(context, wsi);
libwebsocket_set_timeout(wsi, PENDING_TIMEOUT_SSL_ACCEPT,
AWAITING_TIMEOUT);
lwsl_info("inserted SSL acceipt into fds, trying actual SSL_accept\n");
/* fallthru */
@ -340,6 +343,8 @@ int lws_server_socket_service(struct libwebsocket_context *context,
/* OK, we are accepted */
libwebsocket_set_timeout(wsi, NO_PENDING_TIMEOUT, 0);
wsi->mode = LWS_CONNMODE_HTTP_SERVING;
lwsl_debug("accepted new SSL conn "