jiengup commented on code in PR #4388:
URL: https://github.com/apache/iggy/pull/4388#discussion_r4180115363


##########
core/sdk/src/tcp/tcp_client.rs:
##########
@@ -225,6 +232,9 @@ impl BinaryTransport for TcpClient {
     }
 
     async fn send_raw_with_response(&self, code: u32, payload: Bytes) -> 
Result<Bytes, IggyError> {
+        if self.disconnected_by_caller.load(Ordering::SeqCst) {

Review Comment:
   The [agreed 
contract](<https://github.com/apache/iggy/issues/4287#issuecomment-5889200956>) 
says “`disconnect()` holds until `connect()`” and requires “no packets on the 
wire … no reconnect.” The new guard runs only when a request begins. A request 
that passes it before disconnect can fail during teardown, then enter the 
recovery path and call the inherent `connect()`, which does not check caller 
intent. The enabled tests start requests after disconnect, so they do not cover 
this race. Cover this or clarify in the PR message.



-- 
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]

Reply via email to