From bf5b67ef9accb89d091d1ba3313a62d2b801aac4 Mon Sep 17 00:00:00 2001 From: buzz-lightsnack-2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Mon, 6 May 2024 09:51:31 +0800 Subject: [PATCH] throw a reference error if the connection failed --- scripts/utils/net.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/utils/net.js b/scripts/utils/net.js index 95d69c7..b45fb9b 100644 --- a/scripts/utils/net.js +++ b/scripts/utils/net.js @@ -40,6 +40,8 @@ export default class net { } }; }; + } else if (!CONNECT.ok) { + throw new ReferenceError(); } } catch(err) { throw err;