cellular: fix Quectel BG96 missing unlock at socket_connect

pull/10579/head
kevin.ong 2019-05-14 22:39:42 +08:00
parent 64575fe586
commit 20a06d8c2d
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;