From f831be5129c9d76b32adc375c7532bf87eacef16 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Sat, 3 Oct 2020 21:29:36 +0200 Subject: ssh/client: Exit on tomsg error, don't re-loop --- ssh/client.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ssh/client.c b/ssh/client.c index b293a33..e431cf6 100644 --- a/ssh/client.c +++ b/ssh/client.c @@ -647,11 +647,12 @@ int main(int argc, char **argv) { tomsg_event_nullify(event); } else { printf("Tomsg error: %s\n", tomsg_strerror(ret)); - break; + goto error_cleanup; } } } } +error_cleanup: tomsg_close(client); } -- cgit v1.2.3-54-g00ecf