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

Server restart in v1.10.0 - regression? #2668

Open
hugebdu opened this issue Feb 18, 2024 · 4 comments
Open

Server restart in v1.10.0 - regression? #2668

hugebdu opened this issue Feb 18, 2024 · 4 comments

Comments

@hugebdu
Copy link
Contributor

hugebdu commented Feb 18, 2024

Problem description

WIth version 1.10.0 server cannot be restarted. That wasn't the case with previous versions.

Reproduction steps

pseudocode

const server = // init server
server.bindAsync(callback);
server.tryShutdown(callback);
server.bindAsync(callback); // fails with Error('bindAsync called after shutdown')
@murgatroid99
Copy link
Member

I can change this, but depending on what exactly you're trying to accomplish here, you may get a better effect from a different server API.

@hugebdu
Copy link
Contributor Author

hugebdu commented Feb 21, 2024

My use case with restarts is a test stub — I test some logic (integration test) that is dependent on availability of another gRPC endpoint.

@murgatroid99
Copy link
Member

OK, I think you would find the new unbind API useful. You can unbind the specific port that you want to make unavailable, and then bind it again later.

@hugebdu
Copy link
Contributor Author

hugebdu commented Feb 22, 2024

Yes, that's what I ended up using. Just thought to report is as a possible regression.
Thanks

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

No branches or pull requests

2 participants