Skip to content

Commit

Permalink
One more fun channel closing bugfix (#430)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericvolp12 authored Nov 10, 2023
2 parents f654c94 + 2e132ee commit 9ed7584
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bgs/bgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,10 @@ func (bgs *BGS) EventsHandler(c echo.Context) error {
header := events.EventHeader{Op: events.EvtKindMessage}
for {
select {
case evt := <-evts:
case evt, ok := <-evts:
if !ok {
return nil
}
wc, err := conn.NextWriter(websocket.BinaryMessage)
if err != nil {
log.Errorf("failed to get next writer: %s", err)
Expand Down

0 comments on commit 9ed7584

Please sign in to comment.