Skip to content

Commit

Permalink
remove useless os.Exit() after log.Fatalf
Browse files Browse the repository at this point in the history
  • Loading branch information
vieux committed Oct 24, 2013
1 parent c241388 commit 9238464
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,20 +71,17 @@ func main() {
}
if err := daemon(*pidfile, *flGraphPath, flHosts, *flAutoRestart, *flEnableCors, *flDns); err != nil {
log.Fatal(err)
os.Exit(-1)
}
} else {
if len(flHosts) > 1 {
log.Fatal("Please specify only one -H")
return
}
protoAddrParts := strings.SplitN(flHosts[0], "://", 2)
if err := docker.ParseCommands(protoAddrParts[0], protoAddrParts[1], flag.Args()...); err != nil {
if sterr, ok := err.(*utils.StatusError); ok {
os.Exit(sterr.Status)
}
log.Fatal(err)
os.Exit(-1)
}
}
}
Expand Down Expand Up @@ -153,7 +150,6 @@ func daemon(pidfile string, flGraphPath string, protoAddrs []string, autoRestart
}
} else {
log.Fatal("Invalid protocol format.")
os.Exit(-1)
}
go func() {
chErrors <- docker.ListenAndServe(protoAddrParts[0], protoAddrParts[1], server, true)
Expand Down

0 comments on commit 9238464

Please sign in to comment.