fix: do not send data when socket is not READY#128
Merged
shellscape merged 1 commit intoshellscape:masterfrom May 1, 2019
Merged
fix: do not send data when socket is not READY#128shellscape merged 1 commit intoshellscape:masterfrom
shellscape merged 1 commit intoshellscape:masterfrom
Conversation
matheus1lva
approved these changes
Apr 29, 2019
Owner
|
@niieani as always, thank you for pitching in on the project. please rebase to master and you'll get the changes to fix what is blocking CI. |
Follow up to shellscape#113. Even with the above fix, I encountered a similar issue, this time in the `invalid` handler: ``` uncaughtException Error: WebSocket is not open: readyState 2 (CLOSING) at WebSocket.send (/app/node_modules/webpack-plugin-serve/node_modules/ws/lib/websocket.js:322:19) at WebpackPluginServe.socket.invalid (/app/node_modules/webpack-plugin-serve/lib/routes.js:83:16) at WebpackPluginServe.emit (events.js:189:13) at invalid.tap (/app/node_modules/webpack-plugin-serve/lib/index.js:155:41) at SyncHook.eval (eval at create (/app/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:7:1) at Watchpack.watcher.compiler.watchFileSystem.watch (/app/node_modules/webpack/lib/Watching.js:139:33) at Object.onceWrapper (events.js:277:13) at Watchpack.emit (events.js:189:13) at Watchpack._onChange (/app/node_modules/watchpack/lib/watchpack.js:118:7) at Watchpack.<anonymous> (/app/node_modules/watchpack/lib/watchpack.js:99:8) at Watcher.emit (events.js:189:13) at /app/node_modules/watchpack/lib/DirectoryWatcher.js:109:7 at Array.forEach (<anonymous>) at DirectoryWatcher.setFileTime (/app/node_modules/watchpack/lib/DirectoryWatcher.js:108:41) at DirectoryWatcher.onChange (/app/node_modules/watchpack/lib/DirectoryWatcher.js:264:7) at FSWatcher.emit (events.js:189:13) at FSWatcher.<anonymous> (/app/node_modules/watchpack/node_modules/chokidar/index.js:199:15) at /app/node_modules/watchpack/node_modules/chokidar/index.js:238:7 at FSReqWrap.oncomplete (fs.js:155:5) ``` As suggested in shellscape#113 (comment) I've wrapped `send` so the error should not come back anymore.
Contributor
Author
|
@shellscape rebased! |
Owner
|
merged! thank you! I'll release this as soon as I have a chance to look at #131 |
smashercosmo
pushed a commit
to smashercosmo/webpack-plugin-serve
that referenced
this pull request
Jul 23, 2019
Follow up to shellscape#113. Even with the above fix, I encountered a similar issue, this time in the `invalid` handler: ``` uncaughtException Error: WebSocket is not open: readyState 2 (CLOSING) at WebSocket.send (/app/node_modules/webpack-plugin-serve/node_modules/ws/lib/websocket.js:322:19) at WebpackPluginServe.socket.invalid (/app/node_modules/webpack-plugin-serve/lib/routes.js:83:16) at WebpackPluginServe.emit (events.js:189:13) at invalid.tap (/app/node_modules/webpack-plugin-serve/lib/index.js:155:41) at SyncHook.eval (eval at create (/app/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:7:1) at Watchpack.watcher.compiler.watchFileSystem.watch (/app/node_modules/webpack/lib/Watching.js:139:33) at Object.onceWrapper (events.js:277:13) at Watchpack.emit (events.js:189:13) at Watchpack._onChange (/app/node_modules/watchpack/lib/watchpack.js:118:7) at Watchpack.<anonymous> (/app/node_modules/watchpack/lib/watchpack.js:99:8) at Watcher.emit (events.js:189:13) at /app/node_modules/watchpack/lib/DirectoryWatcher.js:109:7 at Array.forEach (<anonymous>) at DirectoryWatcher.setFileTime (/app/node_modules/watchpack/lib/DirectoryWatcher.js:108:41) at DirectoryWatcher.onChange (/app/node_modules/watchpack/lib/DirectoryWatcher.js:264:7) at FSWatcher.emit (events.js:189:13) at FSWatcher.<anonymous> (/app/node_modules/watchpack/node_modules/chokidar/index.js:199:15) at /app/node_modules/watchpack/node_modules/chokidar/index.js:238:7 at FSReqWrap.oncomplete (fs.js:155:5) ``` As suggested in shellscape#113 (comment) I've wrapped `send` so the error should not come back anymore.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains:
Breaking Changes?
If yes, please describe the breakage.
Please Describe Your Changes
Follow up to #113.
Even with the above fix, I encountered a similar issue, this time in the
invalidhandler:As suggested in #113 (comment) I've wrapped
sendso the error should not come back anymore.