coverity 169271 - take care about sockfd of -1 on close

This commit is contained in:
Andy Green 2016-08-28 09:54:30 +08:00
parent 6a75dca024
commit 0f7e4dbd48

View file

@ -420,7 +420,8 @@ just_kill_connection:
lws_remove_from_timeout_list(wsi);
/* checking return redundant since we anyway close */
remove_wsi_socket_from_fds(wsi);
if (wsi->sock != LWS_SOCK_INVALID)
remove_wsi_socket_from_fds(wsi);
wsi->state = LWSS_DEAD_SOCKET;