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

Close the cli prompt when connection disconnects #28

Merged
merged 1 commit into from
Sep 10, 2021
Merged

Conversation

blakebyrnes
Copy link
Contributor

@blakebyrnes blakebyrnes commented Sep 9, 2021

If the server disconnected (ie, you kill ChromeAlive), the cli would stay up

@@ -35,7 +35,9 @@ export default class CoreSessions {
public stop(closeError: Error): boolean {
const hasSessions = this.sessionsById.size > 0;
this.queue.stop(closeError);
this.sessionsById.clear();
for (const session of this.sessionsById.values()) {
session.close().catch();
Copy link
Contributor

Choose a reason for hiding this comment

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

Lint: Promise.catch() requires 1 argument, but received 0

@calebjclark calebjclark merged commit db1cd9b into main Sep 10, 2021
@calebjclark calebjclark deleted the close-prompt branch September 10, 2021 09:48
soundofspace pushed a commit that referenced this pull request Sep 13, 2024
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