From d6306c706e20a0b3f488d41210c6aff5a4c4113a Mon Sep 17 00:00:00 2001 From: cy384 Date: Thu, 28 Jan 2021 08:49:15 -0500 Subject: [PATCH] don't hang if the endpoint fails to open (GH bug #4) --- ssheven-net.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ssheven-net.c b/ssheven-net.c index 8628407..7d6b146 100644 --- a/ssheven-net.c +++ b/ssheven-net.c @@ -524,6 +524,13 @@ void* read_thread(void* arg) // connect ok = init_connection(prefs.hostname+1); + + if (!ok) + { + read_thread_state = DONE; + return 0; + } + YieldToAnyThread(); // check the server pub key vs. known hosts