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.
signal.Notify(termSignal, os.Interrupt, os.Kill)
c := client.NewClient(conf, verifier, termSignal)
go c.MainCycle()
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 {
- } else {
- log.Println("Closed VPN tunnel")