mirror of
https://github.com/Links2004/arduinoWebSockets.git
synced 2025-07-17 09:12:05 +02:00
fix #728 dropNativeClient null ptr
This commit is contained in:
@ -516,6 +516,9 @@ void WebSocketsServerCore::messageReceived(WSclient_t * client, WSopcode_t opcod
|
|||||||
* @param client WSclient_t * ptr to the client struct contaning the native client "->tcp"
|
* @param client WSclient_t * ptr to the client struct contaning the native client "->tcp"
|
||||||
*/
|
*/
|
||||||
void WebSocketsServerCore::dropNativeClient(WSclient_t * client) {
|
void WebSocketsServerCore::dropNativeClient(WSclient_t * client) {
|
||||||
|
if(!client) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(client->tcp) {
|
if(client->tcp) {
|
||||||
if(client->tcp->connected()) {
|
if(client->tcp->connected()) {
|
||||||
#if(WEBSOCKETS_NETWORK_TYPE != NETWORK_ESP8266_ASYNC) && (WEBSOCKETS_NETWORK_TYPE != NETWORK_ESP32)
|
#if(WEBSOCKETS_NETWORK_TYPE != NETWORK_ESP8266_ASYNC) && (WEBSOCKETS_NETWORK_TYPE != NETWORK_ESP32)
|
||||||
|
Reference in New Issue
Block a user