Merge branch 'master' of github.com:cloudflare/cloudflared

This commit is contained in:
Areg Harutyunyan 2019-05-29 15:40:52 -05:00
commit babcd9fe2b
1 changed files with 5 additions and 1 deletions

View File

@ -127,10 +127,14 @@ func action(version string, shutdownC, graceShutdownC chan struct{}) cli.ActionF
tags["hostname"] = c.String("hostname") tags["hostname"] = c.String("hostname")
raven.SetTagsContext(tags) raven.SetTagsContext(tags)
raven.CapturePanic(func() { err = tunnel.StartServer(c, version, shutdownC, graceShutdownC) }, nil) raven.CapturePanic(func() { err = tunnel.StartServer(c, version, shutdownC, graceShutdownC) }, nil)
exitCode := 0
if err != nil { if err != nil {
handleError(err) handleError(err)
exitCode = 1
} }
return err // we already handle error printing, so we pass an empty string so we
// don't have to print again.
return cli.Exit("", exitCode)
} }
} }