Giter Club home page Giter Club logo

Comments (3)

smithkl42 avatar smithkl42 commented on May 18, 2024

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.

smithkl42 avatar smithkl42 commented on May 18, 2024

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.

DirectXMan12 avatar DirectXMan12 commented on May 18, 2024

closing due to age.

from websockify.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.