|
|
@ -166,7 +166,7 @@ func (l *ListenerMux) Close() error { |
|
|
|
|
|
|
|
|
|
|
|
// ServerMux - the main mux server
|
|
|
|
// ServerMux - the main mux server
|
|
|
|
type ServerMux struct { |
|
|
|
type ServerMux struct { |
|
|
|
http.Server |
|
|
|
*http.Server |
|
|
|
listeners []*ListenerMux |
|
|
|
listeners []*ListenerMux |
|
|
|
WaitGroup *sync.WaitGroup |
|
|
|
WaitGroup *sync.WaitGroup |
|
|
|
GracefulTimeout time.Duration |
|
|
|
GracefulTimeout time.Duration |
|
|
@ -178,7 +178,7 @@ type ServerMux struct { |
|
|
|
// NewServerMux constructor to create a ServerMux
|
|
|
|
// NewServerMux constructor to create a ServerMux
|
|
|
|
func NewServerMux(addr string, handler http.Handler) *ServerMux { |
|
|
|
func NewServerMux(addr string, handler http.Handler) *ServerMux { |
|
|
|
m := &ServerMux{ |
|
|
|
m := &ServerMux{ |
|
|
|
Server: http.Server{ |
|
|
|
Server: &http.Server{ |
|
|
|
Addr: addr, |
|
|
|
Addr: addr, |
|
|
|
// Do not add any timeouts Golang net.Conn
|
|
|
|
// Do not add any timeouts Golang net.Conn
|
|
|
|
// closes connections right after 10mins even
|
|
|
|
// closes connections right after 10mins even
|
|
|
|