Library for ethernet
Dependents: VC0706_FTP_Client_Ethernet_MQTT
Fork of WIZnetInterface by
Diff: Socket/TCPSocketConnection.cpp
- Revision:
- 22:01ea4b74d8eb
- Parent:
- 21:584efa51ee60
diff -r 584efa51ee60 -r 01ea4b74d8eb Socket/TCPSocketConnection.cpp --- a/Socket/TCPSocketConnection.cpp Thu Dec 14 04:49:15 2017 +0000 +++ b/Socket/TCPSocketConnection.cpp Mon Jul 16 09:21:17 2018 +0000 @@ -106,8 +106,10 @@ int TCPSocketConnection::receive(char* data, int length) { if((_sock_fd<0) || !(eth->is_connected(_sock_fd))) + { + return -1; - +} int size = eth->wait_readable(_sock_fd, _blocking ? -1 : _timeout); //int size = eth->wait_readable(_sock_fd, _blocking ? _timeout : -1 ); if (size < 0) {