We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 78d3a65 commit 799c0b4Copy full SHA for 799c0b4
internal/background/worker.go
@@ -76,6 +76,8 @@ func (b *Worker) Close(ctx context.Context, err error) error {
76
var resErr error
77
b.m.WithLock(func() {
78
if b.closed {
79
+ // The error of Close is second close, close reason added for describe previous close only, for better debug
80
+ //nolint:errorlint
81
resErr = xerrors.WithStackTrace(fmt.Errorf("%w with reason: %+v", ErrAlreadyClosed, b.closeReason))
82
83
return
0 commit comments