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

Increased ngrok spawn timeout to 15 seconds. #1998

Merged
merged 1 commit into from
Nov 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [1994](https://github.com/microsoft/BotFramework-Emulator/pull/1994)
- [1997](https://github.com/microsoft/BotFramework-Emulator/pull/1997)

- [main] Increased ngrok spawn timeout to 15 seconds to be more forgiving to slower networks in PR [1998](https://github.com/microsoft/BotFramework-Emulator/pull/1998)

## Removed
- [main] Removed unused `VersionManager` class in PR [1991](https://github.com/microsoft/BotFramework-Emulator/pull/1991)

- [main] Rewrote the `emulator/core` package and removed the `emulator/cli` package in PR [1989](https://github.com/microsoft/BotFramework-Emulator/pull/1989)

## v4.6.0 - 2019 - 10 - 31
Expand Down
8 changes: 4 additions & 4 deletions packages/app/main/src/ngrok.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,18 +128,18 @@ export class NgrokInstance {
return { inspectUrl: this.inspectUrl };
}
this.ngrokProcess = this.spawnNgrok(opts);
// If we do not receive a ready state from ngrok within 3 seconds, emit and reject
// If we do not receive a ready state from ngrok within 15 seconds, emit and reject
this.inspectUrl = await new Promise<string>((resolve, reject) => {
const timeout = setTimeout(() => {
const message = 'Failed to receive a ready state from ngrok within 3 seconds.';
const message = 'Failed to receive a ready state from ngrok within 15 seconds.';
this.ngrokEmitter.emit('error', message);
reject(message);
}, 3000);
}, 15000);

/**
* Look for an address in the many messages
* sent by ngrok or fail if one does not arrive
* in 3 seconds.
* in 15 seconds.
*/
const onNgrokData = (data: Buffer) => {
const addr = data.toString().match(addrRegExp);
Expand Down