Closed MarcoPolo closed 4 months ago
Describe the bug
signalReceivers should call Signal.Stop(recv.signals) when they are Stop()ed.
Signal.Stop(recv.signals)
Stop()
Because if not, then when a user does:
app.Start(...) app.Close(...) // block on anything else select {} // for example
the program will fail to exit when the user presses ctrl-c. Which is contrary to what one would expect after starting and stopping the fx app.
To Reproduce
Example
func main() { app := fx.New() app.Start(context.Background()) app.Stop(context.Background()) select {} }
ctrl-c should exit the program
Expected behavior the signal handler reverts back to Go's default signal handler
Additional context should be a ~1 line change :)
Describe the bug
signalReceivers should call
Signal.Stop(recv.signals)
when they areStop()
ed.Because if not, then when a user does:
the program will fail to exit when the user presses ctrl-c. Which is contrary to what one would expect after starting and stopping the fx app.
To Reproduce
Example
ctrl-c should exit the program
Expected behavior the signal handler reverts back to Go's default signal handler
Additional context should be a ~1 line change :)