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

ss: smd: make sure to cancel write sul

This commit is contained in:
Andy Green 2020-12-29 07:29:30 +00:00
parent ad11a09a79
commit 0d720082fb

View file

@ -893,9 +893,13 @@ lws_ss_destroy(lws_ss_handle_t **ppss)
*/
#if defined(LWS_WITH_SYS_SMD)
if (h->policy == &pol_smd && h->u.smd.smd_peer) {
lws_smd_unregister(h->u.smd.smd_peer);
h->u.smd.smd_peer = NULL;
if (h->policy == &pol_smd) {
lws_sul_cancel(&h->u.smd.sul_write);
if (h->u.smd.smd_peer) {
lws_smd_unregister(h->u.smd.smd_peer);
h->u.smd.smd_peer = NULL;
}
}
#endif