Merge pull request #2526 from nsheridan/panic_recover

Recover panic on closed channel
This commit is contained in:
Brad Rydzewski 2018-11-14 08:19:55 -08:00 committed by GitHub
commit 166faba684
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -79,6 +79,9 @@ func EventStreamSSE(c *gin.Context) {
go func() {
// TODO remove this from global config
Config.Services.Pubsub.Subscribe(ctx, "topic/events", func(m pubsub.Message) {
defer func() {
recover() // fix #2480
}()
name := m.Labels["repo"]
priv := m.Labels["private"]
if repo[name] || priv == "false" {