mirror of
https://github.com/Links2004/arduinoWebSockets.git
synced 2025-07-15 16:30:31 +02:00
only send payload when we have a ptr and length
This commit is contained in:
@ -59,7 +59,7 @@ bool SocketIOclient::sendEVENT(uint8_t * payload, size_t length, bool headerToPa
|
||||
uint8_t buf[3] = { eIOtype_MESSAGE, sIOtype_EVENT, 0x00 };
|
||||
ret = WebSocketsClient::write(&_client, buf, 2);
|
||||
}
|
||||
if(ret) {
|
||||
if(ret && payload && length > 0) {
|
||||
ret = WebSocketsClient::write(&_client, payload, length);
|
||||
}
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user