-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example-Server crashes when client leaves page #28
Comments
Haven't seen that before, but really, it's just a minimal example. You're supposed to make your own. |
You should check |
It does crashes. Quick workaorund will be to use android-minicap example with some changes such as port number etc, https://github.com/openstf/minicap/tree/master/example |
Solution: Just add stream.destroy() to ws.on('close').
|
Hey everyone,
everytime a client leaves the example webpage, app.js crashes.
console output:
`
Listening on port 9002
Got a client
Lost a client
/Users/user/Desktop/ios-minicap-master/example/node_modules/ws/lib/WebSocket.js:219
else throw new Error('not opened');
^
Error: not opened
at WebSocket.send (/Users/user/Desktop/ios-minicap-master/example/node_modules/ws/lib/WebSocket.js:219:16)
at Parser.onFrameAvailable (/Users/user/Desktop/ios-minicap-master/example/app.js:43:8)
at Parser.parse (/Users/user/Desktop/ios-minicap-master/example/node_modules/minicap/lib/parser.js:33:34)
at Socket.tryParse (/Users/user/Desktop/ios-minicap-master/example/app.js:56:14)
at emitNone (events.js:86:13)
at Socket.emit (events.js:185:7)
at emitReadable_ (_stream_readable.js:432:10)
at emitReadable (_stream_readable.js:426:7)
at readableAddChunk (_stream_readable.js:187:13)
at Socket.Readable.push (_stream_readable.js:134:10)`
The text was updated successfully, but these errors were encountered: