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:
parent
6901c32a9d
commit
0a132164c2
1 changed files with 4 additions and 0 deletions
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue