add defer to guard against unexpected panics
parent
6fcb929318
commit
e5530c40fe
|
@ -425,8 +425,8 @@ func (s *Server) readConf() error {
|
||||||
func (s *Server) Stop() {
|
func (s *Server) Stop() {
|
||||||
s.send(&stopValue)
|
s.send(&stopValue)
|
||||||
s.mutex.Lock()
|
s.mutex.Lock()
|
||||||
|
defer s.mutex.Unlock()
|
||||||
s.log.close()
|
s.log.close()
|
||||||
s.mutex.Unlock()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Checks if the server is currently running.
|
// Checks if the server is currently running.
|
||||||
|
|
Loading…
Reference in New Issue