fix bug of set port
This commit is contained in:
parent
28661b662d
commit
7a351ee0fb
|
@ -3,6 +3,7 @@ package communicator
|
||||||
import (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
_ "net/http/pprof"
|
_ "net/http/pprof"
|
||||||
|
@ -19,7 +20,7 @@ func init() {
|
||||||
|
|
||||||
func Server() {
|
func Server() {
|
||||||
server := &http.Server{
|
server := &http.Server{
|
||||||
Addr: ":" + string(communicatePort),
|
Addr: ":" + strconv.Itoa(communicatePort),
|
||||||
Handler: mux.NewRouter(),
|
Handler: mux.NewRouter(),
|
||||||
IdleTimeout: time.Second * 5,
|
IdleTimeout: time.Second * 5,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue