GithubHelp home page GithubHelp logo

Memory Leak about aws-mqtt HOT 4 CLOSED

kmamykin avatar kmamykin commented on August 17, 2024
Memory Leak

from aws-mqtt.

Comments (4)

cgood92 avatar cgood92 commented on August 17, 2024

After looking through the mqtt library that this is extending, it looks like the first parameter of the super (the callback) is called under a few different scenarios. That's fine. What we should just do is that in createWebSocketStream, before you create a new Websocket, you should clean up the old websocket that was created.

from aws-mqtt.

kmamykin avatar kmamykin commented on August 17, 2024

I will take a look at this over the weekend. Feel free to submit a PR if you already have this fixed.
Thanks!

from aws-mqtt.

cgood92 avatar cgood92 commented on August 17, 2024

I take it back. It was my fault. I had 2 issues:

  1. I wasn't cleaning up event listeners
  2. I misunderstood just how critical clientId uniqueness must be per client (I was thinking "per user", but that was wrong - per client is the correct terminology). That was pointed out in the README, but I misunderstood it.

So, I have made this MR with my 2 issues documented, in hopes to help other people not have this same problem: #6.

The solution I pointed out above does not seem to fix anything real, so I say we leave it as it is.

Thanks,

from aws-mqtt.

RelaxLiu avatar RelaxLiu commented on August 17, 2024

@cgood92 @kmamykin
After the net is broken, it is reconnected, but there is no data.

publish-subscribe

Subscribe to success

Data reception success

Off the net

Link offline

Reopen the network

After that, the link has been successful. Close, offlin, connection is successful, close, offline has been circulating, neither resubscribe nor cancel subscription.

Want to ask what you need to set up to continue the data transfer
image

from aws-mqtt.

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.