You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes I got MQTT_EVENT_ERROR with error_type MQTT_ERROR_TYPE_TCP_TRANSPORT.
But all the errors (esp_tls_last_esp_err, esp_tls_stack_err, esp_tls_cert_verify_flags, sock_errno) shows 0.
I didn't use TLS in my test, so I'm not surprised the esp_tls_* are 0, but sock_errno is also 0, this is quite confusing.
It looks like this happen when
mqtt_write_data
esp_transport_write returns 0.
i.e. MQTT_CLIENT: Error write data or timeout, written len = 0, errno=0
When disable ESP_LOG, there is no good way to know what's wrong if all the err fields are 0.
So I'm wondering if there is some way to improve this.
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
Got confusing MQTT_EVENT_ERROR
Got confusing MQTT_EVENT_ERROR (IDFGH-4405)
Dec 10, 2020
@AxelLin But the client still disconnects after this error, or? I think we abort connection if the mqtt_write_data() not ESP_OK. The reason could be that the connection terminated in a clean way, with the FIN flag, in that case the errno would be 0.
Yes, in general we'd like add records for these three "errors" that are not reflected in sockets' errno (on the tcp-transport layer)
Sometimes I got MQTT_EVENT_ERROR with error_type MQTT_ERROR_TYPE_TCP_TRANSPORT.
But all the errors (esp_tls_last_esp_err, esp_tls_stack_err, esp_tls_cert_verify_flags, sock_errno) shows 0.
I didn't use TLS in my test, so I'm not surprised the esp_tls_* are 0, but sock_errno is also 0, this is quite confusing.
It looks like this happen when
mqtt_write_data
esp_transport_write returns 0.
i.e. MQTT_CLIENT: Error write data or timeout, written len = 0, errno=0
When disable ESP_LOG, there is no good way to know what's wrong if all the err fields are 0.
So I'm wondering if there is some way to improve this.
The text was updated successfully, but these errors were encountered: