Skip to content

Commit

Permalink
fix: Skip expected error from web socket (#9194)
Browse files Browse the repository at this point in the history
  • Loading branch information
gt2345 authored Apr 22, 2024
1 parent 1b212ae commit 3568f27
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion master/internal/stream/publisher.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,12 @@ func (ps *PublisherSet) streamHandler(
var startupMsg StartupMsg
err := socket.ReadJSON(&startupMsg)
if err != nil {
return fmt.Errorf("error while reading initial startup message: %s", err.Error())
if websocket.IsUnexpectedCloseError(
err, websocket.CloseGoingAway, websocket.CloseAbnormalClosure,
) {
return fmt.Errorf("error while reading initial startup message: %s", err.Error())
}
return nil
}

// startups is where we collect StartupMsg
Expand Down

0 comments on commit 3568f27

Please sign in to comment.