Commit f75a8a43 authored by Philip Withnall's avatar Philip Withnall Committed by Olivier Crête

pseudotcp: Ensure socket is closed after shutdown in non-FIN–ACK mode

If the socket is closed (with pseudo_tcp_socket_close()) with FIN–ACK
unsupported, it should transition to the CLOSED state when
pseudo_tcp_socket_get_next_clock() returns FALSE (as that’s the
old-style indication that the socket has closed).

This is a behaviour change from before the introduction of FIN–ACK:
previously, the socket would stay in the ESTABLISHED state. However,
this should not have been easily detectable by consumers of the API,
as pseudo_tcp_socket_is_closed() did not exist then.
parent 239394af
......@@ -1077,6 +1077,9 @@ pseudo_tcp_socket_get_next_clock(PseudoTcpSocket *self, guint64 *timeout)
"‘Forceful’ shutdown used when FIN-ACK support is enabled");
}
/* Transition to the CLOSED state. */
closedown (self, 0, CLOSEDOWN_REMOTE);
return FALSE;
}
......@@ -1089,6 +1092,9 @@ pseudo_tcp_socket_get_next_clock(PseudoTcpSocket *self, guint64 *timeout)
"‘Graceful’ shutdown used when FIN-ACK support is enabled");
}
/* Transition to the CLOSED state. */
closedown (self, 0, CLOSEDOWN_REMOTE);
return FALSE;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment