]> Cypherpunks.ru repositories - govpn.git/commitdiff
No need to explicitly print the fact that we have exited
authorSergey Matveev <stargrave@stargrave.org>
Thu, 8 Dec 2016 20:34:46 +0000 (23:34 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Thu, 8 Dec 2016 20:34:46 +0000 (23:34 +0300)
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

index 3e372d89029be19f49cab3a4ce81b90f0f713b92..4c2cd3d3717fa063d3438d3f2e5c74392092dd9b 100644 (file)
@@ -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")
        }
 }