-
Notifications
You must be signed in to change notification settings - Fork 105
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
Crashes on client disconnects... #52
Comments
You are surely right with the assuption, that os_free() must not be called on the static zero_len_id, will fix this right now. With the pesp_conn->tcp I have to investigate further... |
good |
Hi, first I lived with the instability, then used a public broker , but as this was too limiting, I decided to place an old Raspberry int the network which hosts the broker now.Sorry, not the answer you probably wanted to hear.Bye pottendoAm 22.09.2022 01:21 schrieb VovanPitersky ***@***.***>:
good
morning, I'm afraid that the error has not been fixed ((((
#68
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
thank you so much for the answer |
hi,
I'm using the uMQTT broker on a esp8266 - this controller offers the MQTT broker and publishes and subscribes also using its 'publish/subscribe()' methods for one other client (an esp32, using another mqtt client).
I use the 'older' lwip 1.x, to not run into the 5 connection limit/issue, as suggested by the readme.
I'm trying to hunt down some stability issue (broker crashes on client disconnects) and I found this:
mqtt_server.cpp::MQTT_server_deleteClientCon around line 225
Following the comment, I suspect that this
os_free()
shall not be called when theclient_id == zero_len_id
however, the brackets are missing.
@martin-ger, what do you think?
As I still experience crashes when clients disconnect, so there must be something else, maybe pointing also to a misplaced 'os_free' somewhere.
I tracked my issue down to here:
this callback is called from the code above through the registered callback in
local_disconnect_cb(mqttClientCon->pCon, ...)
the pointer
pesp_conn->tcp
from the first parameter (type struct espconn *) sometimes is0
or invalid, pointing to some weird address.adding the following sanity checks helps to avoid the crash, but probably does not cure the root cause.
For now my testcase is stable, but this may be a coincidence.
Any thoughts on this are much appreciated.
bye, pottendo
The text was updated successfully, but these errors were encountered: