Coder Social home page Coder Social logo

Comments (3)

gpvigano avatar gpvigano commented on August 28, 2024 1

Right. That's the solution (maybe also connecting in a separate thread and waiting for the thread completion in the coroutine). Anyway attention must be paid working with threads (mostly in Unity), exceptions should be handled, etc. I'm not a skilled multi-threading programmer, a pull request would be welcome here...

from m2mqttunity.

gpvigano avatar gpvigano commented on August 28, 2024

Hi, you can set the timeoutOnConnection field in M2MqttUnityClient to a smaller value, otherwise a best control over the connection should be implemented (in one of my projects I used a small timeout with a defined number of iterated trials, using a list of stored broker addresses and trying to connect to each of them until success).

I understand that this is more a workaround than a solution, sorry, maybe you can find a better support on M2MQTT site asking about MqttClient.

from m2mqttunity.

takemehi avatar takemehi commented on August 28, 2024

The issue can be resolved by connecting in a seperate Thread instead of using a coroutine.

from m2mqttunity.

Related Issues (15)

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.