-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove sleep loop from moth/setup routines. #1244
remove sleep loop from moth/setup routines. #1244
Conversation
old behaviour: getSetup and putSetup loop waiting to get a connection. new behavious: getSetup and putSetup fail and return. main loop then calls them again.
Test Results249 tests 246 ✅ 1m 24s ⏱️ For more details on these failures, see this check. Results for commit f05d7eb. |
so... first patch or two was to make sure that, we don't loop when a broker is down in the connection establishment phase. A second step is that... when the connection establishment does fail, we should notice and back off for a while. The later patches:
|
There is still an inner loop in the mqtt getsetup stuff... Just doing the same thing to mqtt that was done to amqp isn't enough... The change should work in some failure modes, but perhaps not others. |
* QoS should be called by all instances, not just the lead. It's a per-channel/connection setting, not per-queue * Cancel consumer on clean up * we log when the consumer is started, log when it's cancelled too * getCleanUp should have been close. Cleanup is for deleting queue, etc.
old behaviour: getSetup and putSetup loop waiting to get a connection. new behavious: getSetup and putSetup fail and return. main loop then calls them again.
oh my goodness... every time I try to resolve conflicts... I just get more conflicts... |
replaced by #1247 |
working on #339.
We if we have multiple broker connections, then we can't loop waiting to connect to each one... because every time
one broker connection goes down, it will just get stuck there.
This is also consistent with the pattern of trying to have a single place where the code sleeps.
The only change in this code is to remove the loop (which outdented the entire routine by 4... sigh...)
changing "break" to "return" in a few places, and removing the sleeps.