This commit is contained in:
Shivaram Lingamneni 2019-05-22 20:25:57 -04:00
parent a27c46f983
commit 174115deb6
5 changed files with 40 additions and 22 deletions

View file

@ -45,8 +45,8 @@ func (cmd *Command) Run(server *Server, client *Client, session *Session, msg ir
rb.Send(true)
// after each command, see if we can send registration to the client
if !client.registered {
server.tryRegister(client, session)
if !exiting && !client.registered {
exiting = server.tryRegister(client, session)
}
// most servers do this only for PING/PONG, but we'll do it for any command: