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

client error on timeout before connection

Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
Andy Green 2015-04-16 19:55:42 +08:00
parent d3efcd9461
commit bb90f9b7e6

View file

@ -256,8 +256,14 @@ just_kill_connection:
lwsl_debug("calling back CLOSED_HTTP\n");
context->protocols[0].callback(context, wsi,
LWS_CALLBACK_CLOSED_HTTP, wsi->user_space, NULL, 0 );
} else if (wsi->mode == LWS_CONNMODE_WS_CLIENT_WAITING_SERVER_REPLY) {
lwsl_debug("Connection closed before server reply\n");
context->protocols[0].callback(context, wsi,
LWS_CALLBACK_CLIENT_CONNECTION_ERROR,
wsi->user_space, NULL, 0 );
} else
lwsl_debug("not calling back closed\n");
lwsl_debug("not calling back closed mode=%d state=%d\n",
wsi->mode, old_state);
/* deallocate any active extension contexts */