There is a panic with closing closed channels come from functions StopListeners and Exit. It happens because signals are processed asynchronously and corresponded function can be called several times which triggers the panic. As a solution was used sync.Once to make it callable only once.
There is a panic with closing closed channels come from functions
StopListeners
andExit
. It happens because signals are processed asynchronously and corresponded function can be called several times which triggers the panic. As a solution was usedsync.Once
to make it callable only once.Checklist