hubcio commented on code in PR #4507:
URL: https://github.com/apache/iggy/pull/4507#discussion_r4260563641
##########
core/sdk/src/tcp/tcp_client.rs:
##########
@@ -1418,12 +1434,17 @@ impl TcpClient {
let client_address = self.get_client_address_value().await;
info!("Shutting down the {NAME} TCP client: {client_address}");
+ // Set before the stream is taken: a reconnect sweep that installs a
+ // stream after this point sees `Shutdown` and drops it, and a failed
+ // close below cannot leave the client usable.
+ self.set_state(ClientState::Shutdown).await;
Review Comment:
critical: canceling shutdown while it waits for the transport lock leaves
the connection open, and retries skip cleanup. keep `Shutdown` terminal and let
retries finish cleanup here, in `core/sdk/src/quic/quic_client.rs:1087`, and in
`core/sdk/src/websocket/websocket_client.rs:1203`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]