diff --git a/features/netsocket/InternetSocket.cpp b/features/netsocket/InternetSocket.cpp index cd79f0668f..a114b6bbf9 100644 --- a/features/netsocket/InternetSocket.cpp +++ b/features/netsocket/InternetSocket.cpp @@ -62,6 +62,7 @@ nsapi_error_t InternetSocket::close() nsapi_error_t ret = NSAPI_ERROR_OK; if (!_socket) { + _lock.unlock(); return NSAPI_ERROR_NO_SOCKET; }