mirror of
https://github.com/mumble-voip/grumble.git
synced 2025-12-19 21:59:59 -08:00
Don't try to close the TCP listener, since it was already closed when the TLS listener was closed
This commit is contained in:
parent
4a90b31d8d
commit
b2a809ebd8
1 changed files with 10 additions and 13 deletions
|
|
@ -15,9 +15,16 @@ import (
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/golang/protobuf/proto"
|
|
||||||
"hash"
|
"hash"
|
||||||
"log"
|
"log"
|
||||||
|
"net"
|
||||||
|
"net/http"
|
||||||
|
"path/filepath"
|
||||||
|
"strings"
|
||||||
|
"sync"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/golang/protobuf/proto"
|
||||||
"mumble.info/grumble/pkg/acl"
|
"mumble.info/grumble/pkg/acl"
|
||||||
"mumble.info/grumble/pkg/ban"
|
"mumble.info/grumble/pkg/ban"
|
||||||
"mumble.info/grumble/pkg/freezer"
|
"mumble.info/grumble/pkg/freezer"
|
||||||
|
|
@ -27,12 +34,6 @@ import (
|
||||||
"mumble.info/grumble/pkg/serverconf"
|
"mumble.info/grumble/pkg/serverconf"
|
||||||
"mumble.info/grumble/pkg/sessionpool"
|
"mumble.info/grumble/pkg/sessionpool"
|
||||||
"mumble.info/grumble/pkg/web"
|
"mumble.info/grumble/pkg/web"
|
||||||
"net"
|
|
||||||
"net/http"
|
|
||||||
"path/filepath"
|
|
||||||
"strings"
|
|
||||||
"sync"
|
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// The default port a Murmur server listens on
|
// The default port a Murmur server listens on
|
||||||
|
|
@ -1452,9 +1453,9 @@ func (server *Server) Start() (err error) {
|
||||||
// Set sensible timeouts, in case no reverse proxy is in front of Grumble.
|
// Set sensible timeouts, in case no reverse proxy is in front of Grumble.
|
||||||
// Non-conforming (or malicious) clients may otherwise block indefinitely and cause
|
// Non-conforming (or malicious) clients may otherwise block indefinitely and cause
|
||||||
// file descriptors (or handles, depending on your OS) to leak and/or be exhausted
|
// file descriptors (or handles, depending on your OS) to leak and/or be exhausted
|
||||||
ReadTimeout: 5 * time.Second,
|
ReadTimeout: 5 * time.Second,
|
||||||
WriteTimeout: 10 * time.Second,
|
WriteTimeout: 10 * time.Second,
|
||||||
IdleTimeout: 2 * time.Minute,
|
IdleTimeout: 2 * time.Minute,
|
||||||
}
|
}
|
||||||
go func() {
|
go func() {
|
||||||
err := server.webhttp.ListenAndServeTLS("", "")
|
err := server.webhttp.ListenAndServeTLS("", "")
|
||||||
|
|
@ -1532,10 +1533,6 @@ func (server *Server) Stop() (err error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
err = server.tcpl.Close()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
err = server.webwsl.Close()
|
err = server.webwsl.Close()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue