-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: getPayload node exits on webpack-hmr websocket failure (#9279)
### What? When a script attempts to load payload using `getPayload()`, it will end with: `Error: connect ECONNREFUSED 127.0.0.1:3000` etc... ### Why? Even though there is a try/catch, it still errors because WebSocket connection failures happen asynchronously after the ws object is instantiated. ### How? Added the error handling function cached.ws.onerror to prevent exit.
- Loading branch information
1 parent
7489c29
commit 488c28c
Showing
1 changed file
with
9 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters