fix bug of set port

This commit is contained in:
hebo
2019-08-09 17:28:58 +08:00
parent 28661b662d
commit 7a351ee0fb

View File

@@ -3,6 +3,7 @@ package communicator
import (
"flag"
"net/http"
"strconv"
"time"
_ "net/http/pprof"
@@ -19,7 +20,7 @@ func init() {
func Server() {
server := &http.Server{
Addr: ":" + string(communicatePort),
Addr: ":" + strconv.Itoa(communicatePort),
Handler: mux.NewRouter(),
IdleTimeout: time.Second * 5,
}