code: func (s *Session) Close() {
  	atomic.AddInt64(&SessionCount, -1)
  	sessionsByID.Delete(s.ID())
  	sessionsByUID.Delete(s.UID())
  	// TODO: this logic should be moved to nats rpc server
  	if s.IsFrontend && s.Subscriptions != nil && len(s.Subscriptions) > 0 {
  		// if the user is bound to an userid and nats rpc server is being used we need to unsubscribe
  		for _, sub := range s.Subscriptions {
  			err := sub.Unsubscribe()
  			if err != nil {
  				logger.Log.Errorf("error unsubscribing to user's messages channel: %s, this can cause performance and leak issues", err.Error())
  			} else {
  				logger.Log.Debugf("successfully unsubscribed to user's %s messages channel", s.UID())
  			}
  		}
  	}
  	s.entity.Close()
  }
docs: // Close terminates current session, session related data will not be released,
  // all related data should be cleared explicitly in Session closed callback