diff --git a/common/socket/kick.go b/common/socket/kick.go index 300cf612..6883ee27 100644 --- a/common/socket/kick.go +++ b/common/socket/kick.go @@ -50,6 +50,7 @@ func (s *Server) QuitSelf(a int) error { return false }) } else { + go func() { player.Mainplayer.Range(func(key uint32, value *player.Player) bool { if value != nil { @@ -63,9 +64,10 @@ func (s *Server) QuitSelf(a int) error { if value != nil { value.Kick(true) } - os.Exit(0) + return false }) + os.Exit(0) }() }