mirror of
https://github.com/seahu/rflink.git
synced 2025-12-10 07:57:23 +01:00
add close conection when error during send out packet
This commit is contained in:
Binary file not shown.
@@ -47,6 +47,8 @@ int socket_send(const char* buf, const int size)
|
|||||||
clientSocket=-1;
|
clientSocket=-1;
|
||||||
Serial.set_send_function(NULL); // disable Serial.println send line by socket = disable this function
|
Serial.set_send_function(NULL); // disable Serial.println send line by socket = disable this function
|
||||||
log(LOG_ERROR,"TCP server: Problem send data.");
|
log(LOG_ERROR,"TCP server: Problem send data.");
|
||||||
|
log(LOG_ERROR,"TCP server: Connection close.");
|
||||||
|
close(clientSocket);
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user