Giter Site home page Giter Site logo

Comments (5)

m1k1o avatar m1k1o commented on July 17, 2024 1

No. That's definitely unexpected. Ports should be freed after timeout. I'll take a look.

from neko.

m1k1o avatar m1k1o commented on July 17, 2024 1

I was able to reproduce this one. Simply setting EPR port tange to two ports and the third refresh is not working anymore.

When using NEKO_UDPMUX this issue is not present, since it only listens to one port.

I also checked demodesk fork and there the issue does not exists, therefore I would address this as part of v3 rewrite #371.

from neko.

m1k1o avatar m1k1o commented on July 17, 2024

It is normal that with ice lite turned off it uses twice as much ports, because it needs to establish bidirectional communication - to allocate one port for sending and one port for receiving data, to be able to work around various NATs.

UDP is stateless and there is no handshake, therefore the lifecycle of UDP connection must be closed explicitly by the app when the user has been detected to be disconnected. There are as well various timeouts that handle this connection, in our case 6 seconds. See in library source code.

I assume you refreshed the page quicky, and probably the connection was not yet closed. From your logs i see that the connection was closed 11:54:29 what is actually the last time entry in your log. That's when your ports were freed.

Could you please join on the browser in neko, wait until it comes online and then close the browser. Look into logs and wait until you see INF connection state has changed connection_state=closed module=webrtc. It might not happen immediately but ports should be claimed back within 6 seconds, worst case 12sec - when the connection is pronounced as failed.

Reason for this behavior is: When the user is unexpectedly disconnected, because this could happen in real use case when your computer/mobile would switch networks or you would be in a train and your cellular network would switch transmitters.

However, I agree, that page reload could be probably somehow detected and the ports could be claimed quicky without waiting for the timeout.

from neko.

tunahanertekin avatar tunahanertekin commented on July 17, 2024

Thanks for your reply @m1k1o!

I noticed the logs about destroying session and pipeline after waiting a couple of seconds without refreshing, however the ports still do not seem like they are freed since I am not able to reconnect again even after waiting one hour. Once the connection is gone like I stated in my first post, I never succeeded to connect neko regardless of the amount of time I waited. Is it still the expected behavior from neko or is there a possibility that ports remain busy unexpectedly after terminating UDP connection?

from neko.

tunahanertekin avatar tunahanertekin commented on July 17, 2024

Any updates on this?

from neko.

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.