Skip to content

feat: add auto restarts#35

Merged
dsokal merged 1 commit intomainfrom
auto-restart
Mar 12, 2026
Merged

feat: add auto restarts#35
dsokal merged 1 commit intomainfrom
auto-restart

Conversation

@dsokal
Copy link
Copy Markdown
Member

@dsokal dsokal commented Mar 6, 2026

Normally, the VCP will exit after receiving the Reset message.
This PR introduces a newnpm start:auto-restart command, that reconnects the VCP after receiving the Reset message.

@dsokal dsokal force-pushed the auto-restart branch 4 times, most recently from 99a4cb5 to 8d4e11a Compare March 6, 2026 10:45
logger.info("Auto-restart enabled. Closing old VCP...");
vcp.close();
logger.info("Waiting for 3 seconds...");
await delay(3000);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmm, the delay is already added in the reset message handlers. This will double it, right?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, this is intentional. I added another delay here to give vcp.close(); on line 13 some time to close everything.

@dsokal dsokal merged commit 56514f7 into main Mar 12, 2026
2 checks passed
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