From 1fe3ff7c89d2169e2b6b485b23a25c1d10f91108 Mon Sep 17 00:00:00 2001 From: Thomas Schoebel-Theuer Date: Tue, 16 Aug 2022 07:12:15 +0200 Subject: [PATCH] net: remember detected rcv state transitions --- kernel/mars_net.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/mars_net.c b/kernel/mars_net.c index c5cd6258..336bfff6 100644 --- a/kernel/mars_net.c +++ b/kernel/mars_net.c @@ -728,6 +728,9 @@ int mars_recv_raw(struct mars_socket *msock, void *buf, int minlen, int maxlen) status = -EIDRM; goto err; } + } else if (!_socket_not_connected(sock)) { + /* Remember the detected state transition ASAP */ + msock->s_connected = true; } if (minlen < maxlen) {