Code Monkey home page Code Monkey logo

Comments (5)

shamblett avatar shamblett commented on August 30, 2024

Hmm, this sounds like the default keepalive period(60s), try setting this to a lower value, i.e.

client.keepAlivePeriod = 20;

from mqtt_client.

tje3d avatar tje3d commented on August 30, 2024

@shamblett yes that's it. But it seems the behavior is wrong.

from mqtt_client.

shamblett avatar shamblett commented on August 30, 2024

Ok, in what sense, do you mean the behaviour is wrong? 60 seconds seems a fairly common value, some of this depends on your broker of course. A value of 0 disables keep alive, is this what you would prefer as a default?

from mqtt_client.

tje3d avatar tje3d commented on August 30, 2024

Ahh i was wrong, i thought that connection should be always up and Automatically reconnect when disconnected, as i seen in Paho.

It seems this package works properly (http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc385349238).

But I think it should disconnect client only if it is idle for keepAlive time. (not sure if receiving packet count as activation).

Anyway thanks for your perfect job.

from mqtt_client.

shamblett avatar shamblett commented on August 30, 2024

OK, no probs, closing

from mqtt_client.

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.