Skip to content

Commit 92e1464

Browse files
author
Cruz Monrreal
authored
Merge pull request #9584 from michalpasztamobica/tlssocket_would_block
TLSSocket send/recv return WOULD_BLOCK error instead of NO_CONNECTION
2 parents 5c4d5e3 + 9db9724 commit 92e1464

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

features/netsocket/TLSSocketWrapper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ nsapi_error_t TLSSocketWrapper::send(const void *data, nsapi_size_t size)
287287
ret = continue_handshake();
288288
if (ret != NSAPI_ERROR_IS_CONNECTED) {
289289
if (ret == NSAPI_ERROR_ALREADY) {
290-
ret = NSAPI_ERROR_NO_CONNECTION;
290+
ret = NSAPI_ERROR_WOULD_BLOCK;
291291
}
292292
return ret;
293293
}
@@ -341,7 +341,7 @@ nsapi_size_or_error_t TLSSocketWrapper::recv(void *data, nsapi_size_t size)
341341
ret = continue_handshake();
342342
if (ret != NSAPI_ERROR_IS_CONNECTED) {
343343
if (ret == NSAPI_ERROR_ALREADY) {
344-
ret = NSAPI_ERROR_NO_CONNECTION;
344+
ret = NSAPI_ERROR_WOULD_BLOCK;
345345
}
346346
return ret;
347347
}

0 commit comments

Comments
 (0)