From: Sergey Matveev Date: Thu, 8 Dec 2016 20:34:46 +0000 (+0300) Subject: No need to explicitly print the fact that we have exited X-Git-Tag: 7.1^2~22 X-Git-Url: http://www.git.cypherpunks.ru/?p=govpn.git;a=commitdiff_plain;h=79f05cd5fc70602022f9844275fabbe98ba03ebe 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. --- 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") } }