mirror of
https://github.com/github/codeql-action.git
synced 2026-04-27 17:39:15 +00:00
Add timeout event handler
This commit is contained in:
@@ -58,6 +58,10 @@ class NetworkReachabilityBackend implements ReachabilityBackend {
|
||||
req.on("error", (e) => {
|
||||
reject(e);
|
||||
});
|
||||
req.on("timeout", () => {
|
||||
req.destroy();
|
||||
reject(new Error("Connection timeout."));
|
||||
});
|
||||
req.end();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user