Skip to content

Commit

Permalink
Fix: check channel message pointer (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
aopoltorzhicky authored Nov 5, 2023
1 parent fbfe66c commit 5969eec
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/api/handler/websocket/channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ func (channel *Channel[I, M]) waitMessage(ctx context.Context) {
if !ok {
return
}
if msg == nil {
log.Warn().Str("channel", channel.storageChannelName).Msg("nil message")
continue
}
if msg.Channel != channel.storageChannelName {
channel.log.Error().
Str("msg", msg.Channel).
Expand Down

0 comments on commit 5969eec

Please sign in to comment.