Code Monkey home page Code Monkey logo

Comments (4)

droyad avatar droyad commented on September 28, 2024 1

Hi @janpieterz, we've neglected this for over a year, sorry.

I would expect calling listen twice on the same port to throw an exception, just as if another app was already listening. So adding code to silently handle that case may cause callers to have the wrong expectation. Better to handle duplicate ports in the calling code.

Thank you for the offer though.

from halibut.

vincentparrett avatar vincentparrett commented on September 28, 2024

I just hit this issue today, different parts (and threads) of my server code attempt to call the "tentacle" which is in polling mode, sometimes it works, sometimes not, depending on whether those calls overlap. @janpieterz suggestion is a good one.. but I wonder if a single secureclient can handle multiple calls at the same time (I haven't dug into it yet).

from halibut.

droyad avatar droyad commented on September 28, 2024

In Octopus we use a single secure client for all polling tentacles. If for some reason you don't want to keep the listening port open of the life of the application, you should build a wrapper that keeps track of how many things are using it and open/close it appropriately.

from halibut.

vincentparrett avatar vincentparrett commented on September 28, 2024

That makes sense. I did already create a wrapper, but will have to rethink it to enable polling.

from halibut.

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.