diff --git a/stream/stream.go b/stream/stream.go index d80a923..6b11e90 100644 --- a/stream/stream.go +++ b/stream/stream.go @@ -128,7 +128,9 @@ func (s *Stream) callbacker() { callback := <-callbackCh // Execute the callback (with panic protection). - panicCatcher.Try(callback) + if callback != nil { + panicCatcher.Try(callback) + } // Return the channel to the pool of unused channels. putCh(callbackCh)