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

Does the error overlay websocket need a ping heartbeat? #9

Closed
drather19 opened this issue Dec 6, 2019 · 3 comments
Closed

Does the error overlay websocket need a ping heartbeat? #9

drather19 opened this issue Dec 6, 2019 · 3 comments

Comments

@drather19
Copy link

Related to facebook/create-react-app#8091 in the latest CRA.

The same idle timeout seems to affect the websocket used in this plugin, as well (makes sense since it's constructing the same kind of connection).

@pmmmwh
Copy link
Owner

pmmmwh commented Dec 7, 2019

Related to facebook/create-react-app#8091 in the latest CRA.

The same idle timeout seems to affect the websocket used in this plugin, as well (makes sense since it's constructing the same kind of connection).

I didn't notice this until you mentioned it. Pinging seems like a bad idea on first thought, will have to check how webpack-dev-server handles that.

@pmmmwh
Copy link
Owner

pmmmwh commented Dec 12, 2019

I didn't notice this until you mentioned it. Pinging seems like a bad idea on first thought, will have to check how webpack-dev-server handles that.

Did a bit of further research - I think it would be best to move this upstream (to WDS/CRA) because we are just consuming sockets created by these parties generically. The implementation of a heartbeat is heavily dependent on the actual socket being used and is difficult for the overlay to control: for example, if the server did not implement handling for the 'pong' message, even if I can ping it successfully I have no confidence in whether the connection is still valid (the server could close the connection without disconnecting).

@pmmmwh
Copy link
Owner

pmmmwh commented Jun 23, 2020

Resolved by webpack/webpack-dev-server#2404.

@pmmmwh pmmmwh closed this as completed Jun 23, 2020
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

No branches or pull requests

2 participants