From d650d80a6f9f9affe28842ba35f40c5fbf255bec Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Thu, 31 Oct 2024 11:18:23 -0500 Subject: [PATCH] actuall close connections --- tunnel/tunnel.nim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tunnel/tunnel.nim b/tunnel/tunnel.nim index a69a1df..03c39fb 100644 --- a/tunnel/tunnel.nim +++ b/tunnel/tunnel.nim @@ -38,8 +38,10 @@ proc killCmd() = let controllers = collectControllers() if controllers.len == 0: quit 0 for c in controllers: - echo bbfmt"removing file: [b]{c}" - removeFile c + let host = c.lastPathPart().split("-")[2] + let code = exitSsh(host) + if code != 0: + quit $bb"[red][[Error]failed to exit connection for host: " & host proc show() = ## show active connections