Skip to content

Commit 5c50940

Browse files
committed
reduced info level debugging
1 parent 62d31a1 commit 5c50940

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

agent/immortalstreams/stream.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,35 +104,35 @@ func (r *streamReconnector) Reconnect(ctx context.Context, writerSeqNum uint64)
104104
r.s.connected = false
105105
r.s.lastDisconnectionAt = time.Now()
106106
}
107-
r.s.logger.Info(context.Background(), "pending reconnect set",
107+
r.s.logger.Debug(context.Background(), "pending reconnect set",
108108
slog.F("writer_seq", writerSeqNum))
109109
// Signal waiters a reconnect request is pending
110110
r.s.reconnectCond.Broadcast()
111111
r.s.mu.Unlock()
112112

113113
// 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")
115115

116116
// Add a timeout to prevent indefinite hanging
117117
timeout := time.NewTimer(30 * time.Second)
118118
defer timeout.Stop()
119119

120120
select {
121121
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",
123123
slog.F("has_conn", resp.conn != nil),
124124
slog.F("read_seq", resp.readSeq),
125125
slog.Error(resp.err))
126126
return resp.conn, resp.readSeq, resp.err
127127
case <-ctx.Done():
128128
// Context was canceled, return error immediately
129129
// 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()))
131131
return nil, 0, ctx.Err()
132132
case <-r.s.shutdownChan:
133133
// Stream is being shut down, return error immediately
134134
// 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")
136136
return nil, 0, xerrors.New("stream is shutting down")
137137
case <-timeout.C:
138138
// Timeout occurred - clean up the pending request
@@ -142,7 +142,7 @@ func (r *streamReconnector) Reconnect(ctx context.Context, writerSeqNum uint64)
142142
r.s.handshakePending = false
143143
}
144144
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")
146146
return nil, 0, xerrors.New("timeout waiting for reconnection response")
147147
}
148148
}
@@ -239,7 +239,7 @@ func (s *Stream) HandleReconnect(clientConn io.ReadWriteCloser, readSeqNum uint6
239239
return xerrors.New("stream is closed")
240240
}
241241

242-
s.logger.Info(context.Background(), "handling reconnection",
242+
s.logger.Debug(context.Background(), "handling reconnection",
243243
slog.F("read_seq_num", readSeqNum),
244244
slog.F("has_pending", s.pendingReconnect != nil))
245245

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy