diff --git a/drivers/modem/modem_socket.c b/drivers/modem/modem_socket.c index c388c24ad5..1f209fbca4 100644 --- a/drivers/modem/modem_socket.c +++ b/drivers/modem/modem_socket.c @@ -238,6 +238,7 @@ void modem_socket_put(struct modem_socket_config *cfg, int sock_fd) sock->sock_fd = -1; sock->is_waiting = false; sock->is_polled = false; + sock->is_connected = false; (void)memset(&sock->src, 0, sizeof(struct sockaddr)); (void)memset(&sock->dst, 0, sizeof(struct sockaddr)); diff --git a/drivers/modem/modem_socket.h b/drivers/modem/modem_socket.h index edda1f1085..055c7b997c 100644 --- a/drivers/modem/modem_socket.h +++ b/drivers/modem/modem_socket.h @@ -40,6 +40,7 @@ struct modem_socket { struct k_sem sem_data_ready; /** socket state */ + bool is_connected; bool is_waiting; bool is_polled;