diff options
author | Tom Smeding <tom.smeding@gmail.com> | 2020-10-03 21:29:36 +0200 |
---|---|---|
committer | Tom Smeding <tom.smeding@gmail.com> | 2020-10-03 21:29:36 +0200 |
commit | f831be5129c9d76b32adc375c7532bf87eacef16 (patch) | |
tree | 28a663437c1f585df8d128d49e502b459b2b235f | |
parent | 4690f0cec21669eb5c54a4dfec78bef7e568beed (diff) |
ssh/client: Exit on tomsg error, don't re-loop
-rw-r--r-- | ssh/client.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); } |