mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
ssl fix excessive crash workaround
Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
parent
a40760a2de
commit
62824f96d4
2 changed files with 8 additions and 4 deletions
|
@ -731,10 +731,9 @@ int lws_server_socket_service(struct libwebsocket_context *context,
|
|||
break;
|
||||
}
|
||||
|
||||
if (new_wsi)
|
||||
if (lws_server_socket_service_ssl(context, &wsi, new_wsi,
|
||||
accept_fd, pollfd))
|
||||
goto fail;
|
||||
if (lws_server_socket_service_ssl(context, &wsi, new_wsi,
|
||||
accept_fd, pollfd))
|
||||
goto fail;
|
||||
|
||||
return 0;
|
||||
|
||||
|
|
|
@ -445,6 +445,11 @@ lws_server_socket_service_ssl(struct libwebsocket_context *context,
|
|||
switch (wsi->mode) {
|
||||
case LWS_CONNMODE_SERVER_LISTENER:
|
||||
|
||||
if (!new_wsi) {
|
||||
lwsl_err("no new_wsi\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
new_wsi->ssl = SSL_new(context->ssl_ctx);
|
||||
if (new_wsi->ssl == NULL) {
|
||||
lwsl_err("SSL_new failed: %s\n",
|
||||
|
|
Loading…
Add table
Reference in a new issue