Code Monkey home page Code Monkey logo

Comments (6)

ysangkok avatar ysangkok commented on May 29, 2024

The C version does not have this problem

from websockify.

WhiteRavenTechnology avatar WhiteRavenTechnology commented on May 29, 2024

Sounds a lot like the issue I raised (#36), but with better documentation. :)

Good to know the C version doesn't appear to have the problem, but I haven't had a chance to work on the large message issue there, so a Python fix would be most welcome!

from websockify.

ysangkok avatar ysangkok commented on May 29, 2024

Oh, I guess I was too eager to report there. I'll just keep this open until kanaka sees it. This one can be closed afterwards, of course, I'm pretty sure that this is a duplicate.

from websockify.

kanaka avatar kanaka commented on May 29, 2024

Thank you for the test case. That made my life much simpler. And sorry for the slow reply.

Try 5e16b38. It should at least address your test case. I moved the client socket handling earlier in the loop. The problem with the current situation is that if the target immediately closes after sending the data (which seems to happen sporadically even with the sleep), then the data will never be sent to the client because the next time through the loop it will read from the target, detect that it is closed and never reach the client socket handling.

Please also try in the full case where you are seeing the problem. There is still a possible problem where the client socket is busy and so not all the data from the target gets sent, but this is a theoretical possibility and complicates the code so unless people are actually running into I'm hoping this trivial re-ordering will solve what you are actually seeing.

from websockify.

ysangkok avatar ysangkok commented on May 29, 2024

@kanaka : The problem is fixed. The affected test was emscripten/src/runner.py/test_zz_websockets.

from websockify.

kanaka avatar kanaka commented on May 29, 2024

Great! Thanks for verifying.

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.