Добавлена проверка не валидного закрытия соединения

This commit is contained in:
cfif 2024-12-20 12:42:25 +03:00
parent b674ed11bc
commit 709c5a98c8
1 changed files with 1 additions and 1 deletions

View File

@ -122,7 +122,7 @@ uint8_t Gsm_Socket_open(tSocketGsm *env, eSocketType type, char *addr, size_t ad
void Gsm_Socket_close(tSocketGsm *env, uint8_t contextId) {
if (osMutexAcquire(env->access, defaultSocketTimeout) == osOK) {
if (contextId != SOCKET_WRONG_CONTEXT) {
if ((contextId != SOCKET_WRONG_CONTEXT) && (contextId != 0)) {
AtGsmTelitLe910_CloseConnection(env->gsmAt, contextId);
GsmSocketSlot_Clear(env->slots + contextId);
} else {