This commit is contained in:
crusader 2017-11-09 20:06:05 +09:00
parent 8ba623111b
commit e939a0c90c

View File

@ -74,6 +74,8 @@ func (s *server) Start() error {
s.stopChan = make(chan struct{})
logging.Logger().Info(fmt.Sprintf("Server[%s] is started", s.sh.GetName()))
s.sh.OnStart()
s.stopWg.Add(1)
@ -89,7 +91,10 @@ func (s *server) Stop() {
close(s.stopChan)
s.stopWg.Wait()
s.stopChan = nil
s.sh.OnStop()
logging.Logger().Info(fmt.Sprintf("Server[%s] is stopped", s.sh.GetName()))
}
func handleServer(s *server) {