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

Automatically reconnect if we lose connection #81

Closed
wants to merge 2 commits into from

Conversation

yuvipanda
Copy link
Contributor

This needs much better retry logic, with back-offs and status messages. But fundamentally, it does already work \o/

Fixes #80

This needs much better retry logic, with back-offs and status
messages. But fundamentally, it does already work \o/

Fixes #80
@yuvipanda yuvipanda marked this pull request as draft February 4, 2024 07:47
Copy link

github-actions bot commented Feb 4, 2024

Binder 👈 Launch a binder notebook on this branch for commit 27f67ce

I will automatically update this comment whenever this PR is modified

Binder 👈 Launch a binder notebook on this branch for commit fab710e

Base automatically changed from server to main February 5, 2024 23:26
@consideRatio consideRatio mentioned this pull request Feb 8, 2024
@consideRatio
Copy link
Member

Excited about this bugfix! I think it would mean that a restart of for example a ingress-nginx or jupyterhub proxy pod would be handled more gracefully.

Comment on lines +68 to +78
let countDown = 5;
setStatusText(`Reconnecting in ${countDown}s`);
const intervalHandle = setInterval(() => {
countDown -= 1;
setStatusText(`Reconnecting in ${countDown}s`);
console.log(countDown);
if (countDown === 0) {
clearInterval(intervalHandle);
connect();
}
}, 1000);
Copy link
Member

Choose a reason for hiding this comment

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

I think this could make sense to extract into a reconnect / attemptReconnect / handleDisconnect function or similar to improve readability.

Copy link
Member

Choose a reason for hiding this comment

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

@consideRatio
Copy link
Member

consideRatio commented Mar 30, 2024

This needs much better retry logic, with back-offs and status messages.

I'll see if I can get this worked to completion before tuesday. The goal I have made explicit: to provide retry logic with backoff, verify function manually by changing network rules on the fly.

@consideRatio
Copy link
Member

I attempted for an hour or so but failed to make progress =/

@yuvipanda
Copy link
Contributor Author

Superceeded by #112

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle disconnects & reconnects properly
2 participants