GithubHelp home page GithubHelp logo

Comments (8)

flosse avatar flosse commented on May 27, 2024

@DBTaylor Thanks for your feedback.
We'll try to reproduce this soon.
Probably this issue is related to the outdated tokio-proto crate (see #18).
The next version of tokio-modbus will definitely get rid of it and will use the new async/await features of Rust. So if you're interested to help feel free to contact us :)

from tokio-modbus.

flosse avatar flosse commented on May 27, 2024

@uklotzde If you're bored: can you have a look at this?

from tokio-modbus.

DBTaylor avatar DBTaylor commented on May 27, 2024

@flosse Thanks for the quick response. Monday I'll put together a minimal program that reproduces this - I'll also check it on a Tier 1 target to make sure it's not a target specific issue. Glad to hear async/await support is coming - way easier to read than future combinators. I would totally help if I had any idea what I was doing.

from tokio-modbus.

DBTaylor avatar DBTaylor commented on May 27, 2024

@flosse here is a reproduction: https://github.com/DBTaylor/modbus-tcp-leak

It appears to be target agnostic. This issue sounds related, but it appears to have been fixed:
tokio-rs/tokio-proto#194

from tokio-modbus.

flosse avatar flosse commented on May 27, 2024

@DBTaylor Thanks for the example repo. I can reproduce the behavior on my machine.

I tried to build it with the current tokio-proto master but unfortunately it's still the same :(

from tokio-modbus.

uklotzde avatar uklotzde commented on May 27, 2024

I've prepared a quick fix:

#34

[patch.crates-io]
tokio-modbus = { git = "https://github.com/uklotzde/tokio-modbus.git", branch = "tcp_disconnect" }

After invoking disconnect() the connections will enter TIME_WAIT and should disappear after ~30 seconds (depending on your config). Does this solve your issues?

from tokio-modbus.

DBTaylor avatar DBTaylor commented on May 27, 2024

@uklotzde yep that works!

from tokio-modbus.

uklotzde avatar uklotzde commented on May 27, 2024

Great, I will prepare a release.

Your example with the testing instructions was a great help to quickly solve this bug!

from tokio-modbus.

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.