Skip to content

Commit 7a25973

Browse files
committed
Adding agent debug logging around exit conditions
Signed-off-by: Danny Kopping <danny@coder.com>
1 parent 60483e0 commit 7a25973

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

agent/agent.go

+2
Original file line numberDiff line numberDiff line change
@@ -314,9 +314,11 @@ func (a *agent) runLoop() {
314314
if ctx.Err() != nil {
315315
// Context canceled errors may come from websocket pings, so we
316316
// don't want to use `errors.Is(err, context.Canceled)` here.
317+
a.logger.Warn(ctx, "exiting", slog.Error(ctx.Err()))
317318
return
318319
}
319320
if a.isClosed() {
321+
a.logger.Debug(ctx, "closed")
320322
return
321323
}
322324
if errors.Is(err, io.EOF) {

0 commit comments

Comments
 (0)