FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix infinite loop when a Websocket connection is lost by quentin · Pull Request #58 · fhessel/esp32_https_server · GitHub

Repository navigation

Fix infinite loop when a Websocket connection is lost - #58

Merged
fhessel merged 1 commit into
fhessel:masterfrom
quentin:ws-lost-issue
Nov 24, 2019
Merged

fhessel merged 1 commit into
fhessel:masterfrom
quentin:ws-lost-issue

Conversation

quentin commented Nov 17, 2019

Copy link
Copy Markdown
Contributor

When a client closes a Websocket connection without performing a clean closing hand-shake, the server enters an infinite loop. This happens when the client web-browser is killed. I noticed this behaviour when swiping out Chrome on Android.

The suggested change might not be the best fix possible, but it works.

fhessel self-requested a review November 17, 2019 14:06

fhessel commented Nov 17, 2019

Copy link
Copy Markdown
Owner

Thank you for your contributions, I'll review them as soon as possible. The WebSocket implementation is still quite experimental, so there might be (or probably will be) more issues with it.

fhessel left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Could reproduce the problem (using a smartphone and killing the Browser was a good hint) and verify that your suggestion fixes it, so I'd say: Approved!

It might indeed not be an optimal solution to handle the client state in that place, as that is also done at the beginning of the loop() function (here to be precise), but the Websockets in general need some refactoring, so I think that's good for now.

fhessel merged commit f80b961 into fhessel:master Nov 24, 2019
quentin deleted the ws-lost-issue branch November 29, 2019 19:06
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL