Skip to content

Commit

Permalink
fix: should break the loop
Browse files Browse the repository at this point in the history
  • Loading branch information
whxaxes committed Jan 4, 2024
1 parent f728214 commit 039247d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ws_reverse_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,12 @@ func (w *WSReverseProxy) ServeHTTP(ctx context.Context, c *app.RequestContext) {

var ce *websocket.CloseError
var hzce *hzws.CloseError
if !errors.As(err, &ce) || !errors.As(err, &hzce) {
if !errors.As(err, &ce) && !errors.As(err, &hzce) {
hlog.CtxErrorf(ctx, errMsg, err)
continue
}

break
}
}); err != nil {
hlog.CtxErrorf(ctx, "can not upgrade to websocket: %v", err)
Expand Down

0 comments on commit 039247d

Please sign in to comment.