|
@@ -21,9 +21,10 @@ func main() {
|
|
|
if *flag.CpuProfile != "" {
|
|
if *flag.CpuProfile != "" {
|
|
|
f, err := os.Create(*flag.CpuProfile)
|
|
f, err := os.Create(*flag.CpuProfile)
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
- log.Fatal(err)
|
|
|
|
|
|
|
+ log.Printf("ERROR: %v\n", err)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ pprof.StartCPUProfile(f)
|
|
|
}
|
|
}
|
|
|
- pprof.StartCPUProfile(f)
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
gameServer.Serve()
|
|
gameServer.Serve()
|