1
0
Fork 0
forked from External/ergo

monitor: Fix a crash around the MONITOR command

This commit is contained in:
Daniel Oaks 2017-09-25 11:29:27 +10:00
parent 7ff33b88dd
commit e95c75f87d
3 changed files with 39 additions and 6 deletions

View file

@ -59,11 +59,11 @@ type LineLenLimits struct {
// ListenerWrapper wraps a listener so it can be safely reconfigured or stopped
type ListenerWrapper struct {
listener net.Listener
tlsConfig *tls.Config
shouldStop bool
listener net.Listener
tlsConfig *tls.Config
shouldStop bool
// lets the ListenerWrapper inform the server that it has stopped:
stopEvent chan bool
stopEvent chan bool
// protects atomic update of tlsConfig and shouldStop:
configMutex sync.Mutex
}
@ -95,6 +95,7 @@ type Server struct {
logger *logger.Manager
MaxSendQBytes uint64
monitoring map[string][]*Client
monitoringMutex sync.RWMutex
motdLines []string
name string
nameCasefolded string