chimurai / http-proxy-middleware

:zap: The one-liner node.js http-proxy middleware for connect, express, next.js and more
MIT License
10.7k stars 834 forks source link

fix(proxyReqWs): catch socket errors #763

Closed chimurai closed 2 years ago

chimurai commented 2 years ago

Description

Add socket error handler for proxyReqWs

Motivation and Context

hopefully fixes: https://github.com/webpack/webpack-dev-server/issues/1642 related: https://github.com/chimurai/http-proxy-middleware/pull/759

How has this been tested?

Relying on feedback from: https://github.com/webpack/webpack-dev-server/issues/1642#issuecomment-1104325120

Types of changes

Checklist:

coveralls commented 2 years ago

Coverage Status

Coverage decreased (-0.3%) to 98.315% when pulling 9bd9c7e1343938ce619717280a12483dcd946f79 on proxyReqWs-socket-error-handler into f64c99489526c355a96f6e32709da9299175d4e9 on 2.x.