Comments (3)
Well, I've made a bit of progress. By putting in simple debug statements, I've been able to track it down to how websocket.do_handshake
handles the incoming handshake. Apparently the incoming handshake is sometimes just an empty array of bytes, but the way the script checks to see if it's empty is to compare it to an empty string. I don't know under what circumstances that check is appropriate, but it doesn't seem to be working as intended on Python 3.2 on Windows. So I modified it from this:
handshake = sock.recv(1024, socket.MSG_PEEK)
if handshake == ""
raise self.EClose("ignoring empty handshake")
To this:
handshake = sock.recv(1024, socket.MSG_PEEK)
if handshake == "" or len(handshake) == 0:
raise self.EClose("ignoring empty handshake")
That seems to be the appropriate intent of the code, at any rate. But I'm still scratching my head as to why the handshake is empty in the first place.
from websockify.
Interesting. I can't seem to get this to happen with IE or Firefox, just with Chrome. I'm using this with your noVNC library. Any idea why Chrome might handle this stuff different than IE or FF?
Also, if shut down Chrome and reload it, the error still happens. But if I shut down Chrome, connect with IE or FF, then shut those down, and then reconnect with Chrome, it works. Very odd.
from websockify.
closing due to age.
from websockify.
Related Issues (20)
- systemd script to startup
- about target-config HOT 1
- tests failed on macos
- Logging and monitor HOT 1
- How to Revoking a Certificate of VNCServer? HOT 1
- TypeError: 'str' object cannot be interpreted as an integer
- noVNC & websockify in Docker Compose on Raspberry Pi 4 using RealVNC Server HOT 1
- Installation fails HOT 1
- wss: via ssl on linux debian board HOT 1
- Readme is missing examples HOT 1
- Failed when connecting: Connection closed (code: 1005) HOT 2
- soft reload possibility HOT 1
- novnc session getting disconnected after 30 min if left idle HOT 5
- Server disconnected (code: 1015). Open developer tools (F12/Ctrl+Shift+I on Windows, Option+Command+I on Mac OS) and switch to "Console" for details HOT 1
- Exception when use JSONTokenApi as token plugin
- how to connect to tls vnc server HOT 4
- Extra parameters HOT 2
- Connection pooling HOT 1
- which option disabling directory listings HOT 1
- Websockify: Integrate xterm.js HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from websockify.