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

Stop reconnecting websocket after NetworkAdapter.destroy() was called #1198

Merged

Conversation

chschnell
Copy link
Contributor

Stops NetworkAdapter from reconnecting to its Websocket proxy server after V86 was shut down.

@chschnell
Copy link
Contributor Author

I came across this when writing a websockproxy server.

When shutting down V86 while using NetworkAdapter, I see at the server side that the WebSocket connection gets closed by the browser.

But a few seconds later the browser creates a new WebSocket connection, even though V86 is off, and this new connection then just sits around idle.

When I restart V86 a new NetworkAdapter instance is created which creates its own WebSocket connection, but the idle connection keeps sitting there.

This PR fixes that by preventing Websocket reconnects after NetworkAdapter.destroy() was called.

@copy copy merged commit 0612c6c into copy:master Dec 20, 2024
2 of 3 checks passed
@copy
Copy link
Owner

copy commented Dec 20, 2024

Nice find, thanks!

@chschnell chschnell deleted the prevent-websocket-reconnect-after-destroy branch December 20, 2024 18:29
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