From 4f1bda1db32aba8b2b2e0b730e776a09d3f370ba Mon Sep 17 00:00:00 2001
From: Deuce <shurd@sasktel.net>
Date: Fri, 23 Feb 2024 09:31:30 -0500
Subject: [PATCH] Don't just drop out the bottom of the function on timeout.

If we don't get one of the commands we're waiting for, close the
socket and exit instead of returning with the appearance of having
received one.
---
 exec/irc.js | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/exec/irc.js b/exec/irc.js
index a0c7991a17..9adfa80798 100644
--- a/exec/irc.js
+++ b/exec/irc.js
@@ -664,6 +664,9 @@ function wait_for(commands)  {
 		// Don't handle user input at this point!
 		// screen.update();
 	}
+	alert("Connection timed out");
+	sock.close();
+	clean_exit();
 }
 
 function in_a_channel() {
-- 
GitLab