net: remember detected snd state transitions

This commit is contained in:
Thomas Schoebel-Theuer 2022-08-16 07:19:55 +02:00 committed by Thomas Schoebel-Theuer
parent 1fe3ff7c89
commit 4406b649af

View File

@ -489,6 +489,10 @@ int _mars_send_raw(struct mars_socket *msock, const void *buf, int len)
MARS_WRN("interrupting, sent = %d\n", sent);
status = -EIDRM;
break;
} else if (!msock->s_connected &&
!_socket_not_connected(sock)) {
/* Remember the detected state transition ASAP */
msock->s_connected = true;
}
#ifdef USE_SENDPAGE // FIXME: does not work, leads to data corruption (probably due to races with asynchrous sending)