code: func (cs *clientStore) unregister(ID string) (*client, error) {
  	cs.Lock()
  	defer cs.Unlock()
  	c := cs.clients[ID]
  	if c == nil {
  		return nil, nil
  	}
  	c.Lock()
  	if c.hbt != nil {
  		c.hbt.Stop()
  		c.hbt = nil
  	}
  	connID := c.info.ConnID
  	c.Unlock()
  	delete(cs.clients, ID)
  	if len(connID) > 0 {
  		delete(cs.connIDs, string(connID))
  	}
  	if cs.waitOnRegister != nil {
  		delete(cs.waitOnRegister, ID)
  	}
  	err := cs.store.DeleteClient(ID)
  	return c, err
  }
docs: // Unregister a client.