Skip to content

Commit

Permalink
merge(fix): connection error with wsrx
Browse files Browse the repository at this point in the history
🐛 fix connection error with wsrx
  • Loading branch information
ElaBosak233 authored Jun 6, 2024
2 parents e832647 + 2493708 commit 86e955b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/extension/proxy/ws.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func (w *WSProxy) handle(conn *websocket.Conn) {
zap.L().Debug("TCP connection read error.", zap.Error(err))
return
}
if err := conn.WriteMessage(websocket.TextMessage, buf[:n]); err != nil {
if err := conn.WriteMessage(websocket.BinaryMessage, buf[:n]); err != nil {
zap.L().Debug("WebSocket write error.", zap.Error(err))
return
}
Expand Down Expand Up @@ -175,7 +175,7 @@ func (w *WSProxy) handleInTrafficCapture(conn *websocket.Conn) {
zap.L().Debug("TCP connection read error.", zap.Error(_err))
return
}
_err = conn.WriteMessage(websocket.TextMessage, buf[:n])
_err = conn.WriteMessage(websocket.BinaryMessage, buf[:n])
if _err != nil {
zap.L().Debug("WebSocket write error.", zap.Error(_err))
return
Expand Down

0 comments on commit 86e955b

Please sign in to comment.