From 892eff56a602301e8d2068074a59843c91cbba51 Mon Sep 17 00:00:00 2001 From: evilsocket Date: Tue, 13 Mar 2018 15:03:11 +0100 Subject: [PATCH] misc: small fix or general refactoring i did not bother commenting --- main.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/main.go b/main.go index 168a391f..9dc1e5a6 100644 --- a/main.go +++ b/main.go @@ -24,6 +24,7 @@ func main() { fmt.Println(err) os.Exit(1) } + defer sess.Close() if core.HasColors == false { if *sess.Options.NoColors == true { @@ -104,9 +105,4 @@ func main() { } } } - - sess.Close() - - // Windows requires this otherwise the app never exits ... - os.Exit(0) }