Merge pull request #7678 from juhaylinen/fix-nanostack-return-code

Nanostack: fix error code
pull/7727/head
Cruz Monrreal 2018-08-07 09:40:43 -05:00 committed by GitHub
commit 616e14a041
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -552,8 +552,8 @@ nsapi_error_t Nanostack::socket_open(void **handle, nsapi_protocol_t protocol)
}
if (!socket->open()) {
delete socket;
tr_debug("socket_open() ret=%i", NSAPI_ERROR_DEVICE_ERROR);
return NSAPI_ERROR_DEVICE_ERROR;
tr_debug("socket_open() ret=%i", NSAPI_ERROR_NO_MEMORY);
return NSAPI_ERROR_NO_MEMORY;
}
*handle = (void*)socket;