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

h2: cleanly return if fd is -1 on custom close

This commit is contained in:
Andy Green 2024-03-08 06:44:20 +00:00
parent 6901c32a9d
commit 0a132164c2

View file

@ -244,6 +244,10 @@ wsi_logical_close_custom(struct lws *wsi)
{
struct pt_eventlibs_custom *priv = (struct pt_eventlibs_custom *)
lws_evlib_wsi_to_evlib_pt(wsi);
if (lws_get_socket_fd(wsi) == LWS_SOCK_INVALID)
return 0;
return custom_poll_del_fd(priv->io_loop, lws_get_socket_fd(wsi));
}