mirror of
https://github.com/tsl0922/ttyd.git
synced 2025-12-22 20:04:19 +01:00
protocol: fix lws callback compatibility
This commit is contained in:
@@ -419,6 +419,9 @@ callback_tty(struct lws *wsi, enum lws_callback_reasons reason,
|
||||
break;
|
||||
|
||||
case LWS_CALLBACK_CLOSED:
|
||||
if (pss->wsi == NULL)
|
||||
break;
|
||||
|
||||
server->client_count--;
|
||||
lwsl_notice("WS closed from %s, clients: %d\n", pss->address, server->client_count);
|
||||
if (pss->buffer != NULL) {
|
||||
|
||||
Reference in New Issue
Block a user