@@ -104,35 +104,35 @@ func (r *streamReconnector) Reconnect(ctx context.Context, writerSeqNum uint64)
104
104
r .s .connected = false
105
105
r .s .lastDisconnectionAt = time .Now ()
106
106
}
107
- r .s .logger .Info (context .Background (), "pending reconnect set" ,
107
+ r .s .logger .Debug (context .Background (), "pending reconnect set" ,
108
108
slog .F ("writer_seq" , writerSeqNum ))
109
109
// Signal waiters a reconnect request is pending
110
110
r .s .reconnectCond .Broadcast ()
111
111
r .s .mu .Unlock ()
112
112
113
113
// Wait for response from HandleReconnect or context cancellation with timeout
114
- r .s .logger .Info (context .Background (), "reconnect function waiting for response" )
114
+ r .s .logger .Debug (context .Background (), "reconnect function waiting for response" )
115
115
116
116
// Add a timeout to prevent indefinite hanging
117
117
timeout := time .NewTimer (30 * time .Second )
118
118
defer timeout .Stop ()
119
119
120
120
select {
121
121
case resp := <- responseChan :
122
- r .s .logger .Info (context .Background (), "reconnect function got response" ,
122
+ r .s .logger .Debug (context .Background (), "reconnect function got response" ,
123
123
slog .F ("has_conn" , resp .conn != nil ),
124
124
slog .F ("read_seq" , resp .readSeq ),
125
125
slog .Error (resp .err ))
126
126
return resp .conn , resp .readSeq , resp .err
127
127
case <- ctx .Done ():
128
128
// Context was canceled, return error immediately
129
129
// The stream's Close() method will handle cleanup
130
- r .s .logger .Info (context .Background (), "reconnect function context canceled" , slog .Error (ctx .Err ()))
130
+ r .s .logger .Debug (context .Background (), "reconnect function context canceled" , slog .Error (ctx .Err ()))
131
131
return nil , 0 , ctx .Err ()
132
132
case <- r .s .shutdownChan :
133
133
// Stream is being shut down, return error immediately
134
134
// The stream's Close() method will handle cleanup
135
- r .s .logger .Info (context .Background (), "reconnect function shutdown signal received" )
135
+ r .s .logger .Debug (context .Background (), "reconnect function shutdown signal received" )
136
136
return nil , 0 , xerrors .New ("stream is shutting down" )
137
137
case <- timeout .C :
138
138
// Timeout occurred - clean up the pending request
@@ -142,7 +142,7 @@ func (r *streamReconnector) Reconnect(ctx context.Context, writerSeqNum uint64)
142
142
r .s .handshakePending = false
143
143
}
144
144
r .s .mu .Unlock ()
145
- r .s .logger .Info (context .Background (), "reconnect function timed out" )
145
+ r .s .logger .Debug (context .Background (), "reconnect function timed out" )
146
146
return nil , 0 , xerrors .New ("timeout waiting for reconnection response" )
147
147
}
148
148
}
@@ -239,7 +239,7 @@ func (s *Stream) HandleReconnect(clientConn io.ReadWriteCloser, readSeqNum uint6
239
239
return xerrors .New ("stream is closed" )
240
240
}
241
241
242
- s .logger .Info (context .Background (), "handling reconnection" ,
242
+ s .logger .Debug (context .Background (), "handling reconnection" ,
243
243
slog .F ("read_seq_num" , readSeqNum ),
244
244
slog .F ("has_pending" , s .pendingReconnect != nil ))
245
245
0 commit comments