Skip to content
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

fix(websocket): propagate error type #694

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

johanstokking
Copy link
Contributor

Description

This fixes an regression from 0d8f2a6 that caused the error_type not to be available in the event dispatcher when auto disconnect is disabled.

The error_type must be set for the event dispatcher to propagate the right errors in the next event. This is unrelated to whether auto disconnect is enabled or not.

Related

Fixes regression #626
References #630

Testing

Test steps:

  1. Start TLS server on a host machine with an untrusted certificate (e.g. self-signed, wrong name)
  2. Let an ESP32 application connect with esp_websocket_client
  3. Observe the error fields in the disconnected event. They were not propagated. They are now.

Checklist

Before submitting a Pull Request, please ensure the following:

  • 🚨 This PR does not introduce breaking changes.
  • All CI checks (GH Actions) pass.
  • Documentation is updated as needed.
  • Tests are updated or added as necessary.
  • Code is well-commented, especially in complex areas.
  • Git history is clean — commits are squashed to the minimum necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants