Merge pull request #9584 from michalpasztamobica/tlssocket_would_block

TLSSocket send/recv return WOULD_BLOCK error instead of NO_CONNECTION
pull/9677/head
Cruz Monrreal 2019-02-11 18:45:50 -06:00 committed by GitHub
commit 92e1464024
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -287,7 +287,7 @@ nsapi_error_t TLSSocketWrapper::send(const void *data, nsapi_size_t size)
ret = continue_handshake();
if (ret != NSAPI_ERROR_IS_CONNECTED) {
if (ret == NSAPI_ERROR_ALREADY) {
ret = NSAPI_ERROR_NO_CONNECTION;
ret = NSAPI_ERROR_WOULD_BLOCK;
}
return ret;
}
@ -341,7 +341,7 @@ nsapi_size_or_error_t TLSSocketWrapper::recv(void *data, nsapi_size_t size)
ret = continue_handshake();
if (ret != NSAPI_ERROR_IS_CONNECTED) {
if (ret == NSAPI_ERROR_ALREADY) {
ret = NSAPI_ERROR_NO_CONNECTION;
ret = NSAPI_ERROR_WOULD_BLOCK;
}
return ret;
}