Skip to content

Commit 2b5b614

Browse files
committed
Add timeout event handler
1 parent 555ee17 commit 2b5b614

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

lib/start-proxy-action.js

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/start-proxy/reachability.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ class NetworkReachabilityBackend implements ReachabilityBackend {
5858
req.on("error", (e) => {
5959
reject(e);
6060
});
61+
req.on("timeout", () => {
62+
req.destroy();
63+
reject(new Error("Connection timeout."));
64+
});
6165
req.end();
6266
});
6367
}

0 commit comments

Comments
 (0)