-
Notifications
You must be signed in to change notification settings - Fork 54
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
Logger handler does not handle connection :terminated #97
Comments
Actually just noticed a "terminate" function, but maybe this isn't used now??? I am confused. tortoise/lib/tortoise/handler/logger.ex Line 56 in 113e70b
|
Internally tortoise have a pubsub like mechanism for informing its various processes of events happening in the system. One of the topics is the So, the The Notice that I am working on upgrading the client to MQTT 5. This will bring some changes to the design. I hope that I can make a compatibility mode so the code that currently rely on tortoise should work (or work with minimal changes). The changes are due to major changes in the protocol itself, which would make the current Tortoise design a bit too opinionated—MQTT 3.1.1 was a more strict protocol, where MQTT 5 is more open and "do what ever you want"; so I need to expose more of the MQTT internals to the end user to support this :) |
Thanks for these details. Where does the connection |
There is a difference between being "down" (we might come up again later) and "terminated" (the connection is closed and will not come up again). But these semantics might change in the future, because I had to rewrite the connection logic to accommodate the extended authentication exchange introduced in MQTT 5. |
Ok, so looks like in current versions I should look for both |
I see the logger class handles
:terminating
but not:terminated
.https://github.com/gausby/tortoise/blob/master/lib/tortoise/handler/logger.ex#L26
Actually might help if these states were documented better. The example in README.md only lists
:up
and:down
as valid options. Presumably:terminating
happens first, followed by:terminated
, followed by:down
? Not really sure.I noticed my code generating the following error, which is why I chose to investigate:
Regards
The text was updated successfully, but these errors were encountered: