dowwntime 1.3.4 → 1.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +4 -1
- package/dist/cli.mjs.map +1 -1
- package/dist/index.mjs +4 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -14886,7 +14886,7 @@ const debug$1 = debug("dowwntime");
|
|
|
14886
14886
|
*/
|
|
14887
14887
|
const measureRequest = async (url$2, options) => {
|
|
14888
14888
|
const startAt = Date.now();
|
|
14889
|
-
return await new Promise((resolve$1) => {
|
|
14889
|
+
return await new Promise((resolve$1, reject) => {
|
|
14890
14890
|
let tlsHandshakeAt;
|
|
14891
14891
|
let firstByteAt;
|
|
14892
14892
|
const req = ((typeof url$2 === "string" ? new URL(url$2) : url$2).protocol === "https:" ? https : http).request(url$2, options, (res) => {
|
|
@@ -14901,6 +14901,9 @@ const measureRequest = async (url$2, options) => {
|
|
|
14901
14901
|
});
|
|
14902
14902
|
});
|
|
14903
14903
|
});
|
|
14904
|
+
req.on("error", (err) => {
|
|
14905
|
+
reject(err);
|
|
14906
|
+
});
|
|
14904
14907
|
req.on("socket", (socket) => {
|
|
14905
14908
|
socket.on("secureConnect", () => {
|
|
14906
14909
|
tlsHandshakeAt = Date.now();
|