mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
tls: ensure using ssl before doing tls_shutdown
This commit is contained in:
parent
ee15b82b6e
commit
90eb83a307
2 changed files with 5 additions and 2 deletions
|
@ -271,7 +271,9 @@ int
|
|||
#endif
|
||||
lws_tls_server_abort_connection(struct lws *wsi)
|
||||
{
|
||||
__lws_tls_shutdown(wsi);
|
||||
if (wsi->tls.use_ssl)
|
||||
__lws_tls_shutdown(wsi);
|
||||
|
||||
SSL_free(wsi->tls.ssl);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -682,7 +682,8 @@ lws_tls_server_new_nonblocking(struct lws *wsi, lws_sockfd_type accept_fd)
|
|||
int
|
||||
lws_tls_server_abort_connection(struct lws *wsi)
|
||||
{
|
||||
SSL_shutdown(wsi->tls.ssl);
|
||||
if (wsi->tls.use_ssl)
|
||||
SSL_shutdown(wsi->tls.ssl);
|
||||
SSL_free(wsi->tls.ssl);
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue