Merge pull request #10579 from kevinong0108/fix_cellular_quectel_bg96

Cellular: fix Quectel BG96 missing unlock at socket_connect
pull/10595/head
Anna Bridge 2019-05-16 10:58:32 +01:00 committed by GitHub
commit 6344b9db2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -70,6 +70,7 @@ nsapi_error_t QUECTEL_BG96_CellularStack::socket_connect(nsapi_socket_t handle,
if ((_at.get_last_error() == NSAPI_ERROR_OK) && err) {
if (err == BG96_SOCKET_BIND_FAIL) {
socket->created = false;
_at.unlock();
return NSAPI_ERROR_PARAMETER;
}
_at.cmd_start("AT+QICLOSE=");
@ -177,6 +178,7 @@ void QUECTEL_BG96_CellularStack::handle_open_socket_response(int &modem_connect_
modem_connect_id = _at.read_int();
err = _at.read_int();
}
nsapi_error_t QUECTEL_BG96_CellularStack::create_socket_impl(CellularSocket *socket)
{
int modem_connect_id = -1;