mirror of https://github.com/ARMmbed/mbed-os.git
ESP8266: with empty packet send returns zero if TCP, unsupported otherwise
parent
daefce6bf4
commit
d712568b8f
|
@ -568,6 +568,11 @@ int ESP8266Interface::socket_send(void *handle, const void *data, unsigned size)
|
|||
return NSAPI_ERROR_NO_SOCKET;
|
||||
}
|
||||
|
||||
if (!size) {
|
||||
// Firmware limitation
|
||||
return socket->proto == NSAPI_TCP ? 0 : NSAPI_ERROR_UNSUPPORTED;
|
||||
}
|
||||
|
||||
unsigned long int sendStartTime = rtos::Kernel::get_ms_count();
|
||||
do {
|
||||
status = _esp.send(socket->id, data, size);
|
||||
|
|
Loading…
Reference in New Issue