code: func (s *StanServer) performmUnsubOrCloseSubscription(m *nats.Msg, req *pb.UnsubscribeRequest, isSubClose bool) {
  	// With partitioning, first verify that this server is handling this
  	// channel. If not, do not return an error, since another server will
  	// handle it. If no other server is, the client will get a timeout.
  	if s.partitions != nil {
  		if r := s.partitions.sl.Match(req.Subject); len(r) == 0 {
  			return
  		}
  	}
  
  	s.barrier(func() {
  		var err error
  		if s.isClustered {
  			if isSubClose {
  				err = s.replicateCloseSubscription(req)
  			} else {
  				err = s.replicateRemoveSubscription(req)
  			}
  		} else {
  			s.closeMu.Lock()
  			err = s.unsubscribe(req, isSubClose)
  			s.closeMu.Unlock()
  		}
  		// If there was an error, it has been already logged.
  
  		if err == nil {
  			// This will check if the channel has MaxInactivity defined,
  			// if so and there is no active subscription, it will start the
  			// delete timer.
  			s.channels.maybeStartChannelDeleteTimer(req.Subject, nil)
  		}
  
  		// If err is nil, it will be a non-error response
  		s.sendSubscriptionResponseErr(m.Reply, err)
  	})
  }
docs: // performmUnsubOrCloseSubscription processes the unsub or close subscription
  // request.