Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: Settimino.cpp
- Revision:
- 3:17eacb15ba1f
- Parent:
- 2:f9537de477ee
--- a/Settimino.cpp Thu Nov 17 08:31:54 2016 +0000
+++ b/Settimino.cpp Thu Nov 17 08:37:35 2016 +0000
@@ -282,8 +282,11 @@
TCPClient.set_blocking(true, RecvTimeout);
int ret = TCPClient.receive(buf, Size);
TCPClient.set_blocking(false);
- if(ret == 0)
+ if(ret <= 0)
+ {
+ FlushSocket();
return SetLastError(errTCPConnectionReset);
+ }
return SetLastError(0);
}
//-----------------------------------------------------------------------------