Skip to content

Commit

Permalink
Fix test hitting panic if len(msgs)==0
Browse files Browse the repository at this point in the history
  • Loading branch information
PlasmaPower committed Jan 8, 2024
1 parent c5ad12a commit a211e2b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions wsbroadcastserver/clientconnection.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ func (cc *ClientConnection) writeBacklog(ctx context.Context, segment backlog.Ba
msgs = msgs[requestedIdx:]
}
}
if len(msgs) == 0 {
break
}
isFirstSegment = false
bm := &m.BroadcastMessage{
Version: m.V1,
Expand Down

0 comments on commit a211e2b

Please sign in to comment.