Modified Wi-SUN tasklet to return correct status when calling connect twice

When calling mesh connect method twice NSAPI_ERROR_IS_CONNECTED is returned
instead of NSAPI_ERROR_DEVICE_ERROR Following the mesh API documentation.
pull/11556/head
Mika Tervonen 2019-09-30 14:15:14 +03:00
parent f513bce4a3
commit 86e3a5a021
1 changed files with 1 additions and 1 deletions

View File

@ -116,7 +116,7 @@ nsapi_error_t map_mesh_error(mesh_error_t err)
case MESH_ERROR_PARAM:
return NSAPI_ERROR_PARAMETER;
case MESH_ERROR_STATE:
return NSAPI_ERROR_DEVICE_ERROR;
return NSAPI_ERROR_IS_CONNECTED;
default:
return NSAPI_ERROR_DEVICE_ERROR;
}