Comments (3)
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.
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.
The issue can be resolved by connecting in a seperate Thread instead of using a coroutine.
from m2mqttunity.
Related Issues (15)
- Problems with encryption enabled
- WebGL + MQTT authentication HOT 1
- Connection Delay not work. HOT 1
- Unable to receive message after reconnection in Unity HOT 1
- M2MqttUnity not working with HiveMQ Broker HOT 6
- Connection failed, no route to host on iOS?
- can not connect to the mqtt broker with the (WebGL) output I got from Unity HOT 1
- NullReferenceException: Object reference not set to an instance of an object HOT 1
- Subscribe to multiple topics at once? HOT 3
- Receive: Test message is not displayed and gives the following error HOT 1
- is it compatible on ios? HOT 3
- subscribe HOT 1
- il2cpp build hololens connection problem HOT 2
- any chance to get this work in WebGL?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from m2mqttunity.