From 79f05cd5fc70602022f9844275fabbe98ba03ebe Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Thu, 8 Dec 2016 23:34:46 +0300 Subject: [PATCH] No need to explicitly print the fact that we have exited Zero return code from the program tells that everything is ok. There is "[finish ...]" message (also in syslog if it is enabled) telling that program (and a tunnel) was going to shutdown. --- src/cypherpunks.ru/govpn/cmd/govpn-client/main.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/cypherpunks.ru/govpn/cmd/govpn-client/main.go b/src/cypherpunks.ru/govpn/cmd/govpn-client/main.go index 3e372d8..4c2cd3d 100644 --- a/src/cypherpunks.ru/govpn/cmd/govpn-client/main.go +++ b/src/cypherpunks.ru/govpn/cmd/govpn-client/main.go @@ -144,9 +144,7 @@ func main() { signal.Notify(termSignal, os.Interrupt, os.Kill) c := client.NewClient(conf, verifier, termSignal) go c.MainCycle() - if err := <-c.Error; err != nil { + if err = <-c.Error; err != nil { log.Fatalln(err) - } else { - log.Println("Closed VPN tunnel") } } -- 2.44.0