go-basher
go-basher copied to clipboard
goroutine leak in Context.Run?
It seems there is a goroutine leak in Context.Run: https://github.com/progrium/go-basher/blob/master/basher.go#L267 goroutine is launched which iterates over signals chan. But the chan is never closed, so the routine never exits... shouldn't there be something like
defer func() {
signal.Stop(signals)
close(signals)
}()
after signal.Notify(signals)
call?
Do you think https://github.com/progrium/go-basher/pull/23 would resolve it?
No - the goroutine will still stay around until the signals
chan is closed (which currently never happens).
Hmmm I think that makes sense - @progrium thoughts? - and would take a PR :)