go-sse
go-sse copied to clipboard
Fix panic on sse-server shutdown
This is the fix for the "panic on sse-server shutdown when there is at least one active connection" issue. It does the following:
- after calling the Shutdown() function it doesn't allow new sse-connections to be established
- it avoids sending to already closed removeClient channel
I've tested this forked version in an application utilising go-sse and can confirm it fixes the panic on shutdown