modem: hl7800: only send null packet for TCP
Only TCP sockets should send a NULL packet if the server closes the connection or there is a socket error. UDP sockets do not need to do this because they are connectionless. Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
This commit is contained in:
parent
208927d640
commit
a9eead1824
|
@ -3506,10 +3506,12 @@ static void sock_notif_cb_work(struct k_work *work)
|
|||
k_work_reschedule_for_queue(&hl7800_workq, &sock->notif_work,
|
||||
MDM_SOCK_NOTIF_DELAY);
|
||||
} else {
|
||||
LOG_DBG("Sock %d trigger NULL packet", sock->socket_id);
|
||||
sock->state = SOCK_SERVER_CLOSED;
|
||||
k_work_submit_to_queue(&hl7800_workq, &sock->recv_cb_work);
|
||||
sock->error = false;
|
||||
if (sock->type == SOCK_STREAM) {
|
||||
LOG_DBG("Sock %d trigger NULL packet", sock->socket_id);
|
||||
sock->state = SOCK_SERVER_CLOSED;
|
||||
k_work_submit_to_queue(&hl7800_workq, &sock->recv_cb_work);
|
||||
sock->error = false;
|
||||
}
|
||||
}
|
||||
hl7800_unlock();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue