Skip to content

Commit 58951db

Browse files
committed
refactor: improve logging for disconnected clients
1 parent 89e48bb commit 58951db

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

internal/certificatetransparency/ct-watcher.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,9 @@ func (w *worker) startDownloadingCerts(ctx context.Context) {
385385
case strings.Contains(workerErr.Error(), "no such host"):
386386
log.Printf("Worker for '%s' failed to resolve host: %s\n", w.ctURL, workerErr)
387387
return
388+
case errors.Is(workerErr, context.Canceled):
389+
log.Printf("Worker for '%s' canceled\n", w.ctURL)
390+
return
388391
}
389392

390393
log.Printf("Worker for '%s' failed with unexpected error: %s\n", w.ctURL, workerErr)

0 commit comments

Comments
 (0)