1
0
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:
Ondrej Lycka
2017-07-25 20:19:17 +02:00
parent b764d9ad3e
commit 4d17bd1e7e
3 changed files with 2 additions and 0 deletions

Binary file not shown.

View File

@@ -47,6 +47,8 @@ int socket_send(const char* buf, const int size)
clientSocket=-1;
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: Connection close.");
close(clientSocket);
}
return ret;
}

Binary file not shown.