Skip to content

Commit 31c801f

Browse files
committed
runner-wrapper: buffer errCh to avoid goroutine leak on shutdown
The wrapper start() goroutine always sends exactly one error into errCh. When Run() exits early due to context cancellation, the unbuffered channel could block the sender forever. Make errCh buffered (size 1) to ensure the start goroutine can always complete and exit cleanly. No behavior change under normal execution.
1 parent f63b909 commit 31c801f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

helpers/runner_wrapper/wrapper.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func New(log logrus.FieldLogger, path string, args []string) *Wrapper {
4949
log: log,
5050
path: path,
5151
args: args,
52-
errCh: make(chan error),
52+
errCh: make(chan error, 1),
5353
terminationTimeout: DefaultTerminationTimeout,
5454
status: api.StatusUnknown,
5555
commanderFactory: newDefaultCommander,

0 commit comments

Comments
 (0)