MQTT client test with W5200 ethernet shield
Dependents: IBMIoTClientEthernetExample_W5200
Fork of W5500Interface by
Diff: Socket/Socket.cpp
- Revision:
- 4:af0ed4fbca02
- Parent:
- 0:e11e8793c3ce
- Child:
- 9:dfffa4d6f022
--- a/Socket/Socket.cpp Wed Aug 20 05:37:05 2014 +0000 +++ b/Socket/Socket.cpp Mon Sep 01 01:54:29 2014 +0000 @@ -35,8 +35,11 @@ int Socket::close() { // add this code refer from EthernetInterface. + // update by Patrick Pollet + int res; + res = eth->close(_sock_fd); _sock_fd = -1; - return (eth->close(_sock_fd)) ? 0 : -1; + return (res)? 0: -1; } Socket::~Socket()