-
Notifications
You must be signed in to change notification settings - Fork 51
Client Disconnects from Server on new publish #66
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
Comments
You defined your MQTT topic in the "Adafruit.io style topic" format: Does the same error occur if you change the topic to a standardized MQTT topic format a-la: |
I replaced This is how I see the disconnect from the server console:
about a minute after that I start to see this error on the Feather console:
If I ctr-c on the Feather console this is what I get: Code done running. I tried to figure out if it was a timeout issue sending publish commands from anther client constantly to the channel the feather was subscribed to and timed when the feather client would disconnect. It varied from 15 to 45 seconds after connecting to the MQTT server. |
This may be related to #68 |
I think I have a theory on what is happening. Still trying to come up with a solution. I do believe this is causing the problem with #68 Part 1: Part 2: If Part 3: Once disconnected from the server the next time that Ping is called the loop inside Ping:
gets stuck because it will never receive a response from the server because its disconnected. |
re: part 1...The timestamp is reset within the Part 2 and 3 are likely correct, the issue may be with |
@sops21 I did some testing and I believe this is fixed with this pull request: #69. Could you also try it out? Previously, on
After applying #69, I no longer have this issue when connecting to Adafruit IO's MQTT broker:
|
@brentru I can confirm that this fixed my test as well. Thanks! |
I'm running an Ethernet Feather Wing and the m4 Express Feather. I'm running the current version of adafruit_minimqtt and adafruit_minimqtt with CircuitPython 6.1.0.
After connecting to a local Mosquitto broker, the client will disconnected after I publish (From another client) to the same subscription. I don't see any error or crashes on the serial monitor, but on my broker log, I see:
"Client Test 2 closed its connection"
After what I assume is the timeout period, I receive "
" on the serial monitor.
Any thoughts or where I should start to debug?
My test code and current version is below:
PS C:\Users\Jason> python3 -m circup freeze
Found device at E:, running CircuitPython 6.1.0.
A newer version of CircuitPython (6.2.0-beta.0) is available.
adafruit_debouncer==1.3.8
adafruit_displayio_ssd1306==1.2.3
adafruit_logging==1.2.5
adafruit_requests==1.9.4
neopixel==6.0.1
adafruit_bitmap_font==1.3.3
adafruit_bus_device==5.0.4
adafruit_led_animation==2.5.2
adafruit_character_lcd==3.3.6
adafruit_display_text==2.12.1
adafruit_minimqtt==5.0.0
adafruit_wiznet5k==1.9.0`
The text was updated successfully, but these errors were encountered: