code: func (s *StanServer) updateDurable(ss *subStore, sub *subState) error {
  	// Reset the hasFailedHB boolean since it may have been set
  	// if the client previously crashed and server set this
  	// flag to its subs.
  	sub.hasFailedHB = false
  	// Store in the client
  	if !s.clients.addSub(sub.ClientID, sub) {
  		return fmt.Errorf("can't find clientID: %v", sub.ClientID)
  	}
  	// Update this subscription in the store
  	if err := sub.store.UpdateSub(&sub.SubState); err != nil {
  		return err
  	}
  	ss.Lock()
  	// Do this only for durable subscribers (not durable queue subscribers).
  	if sub.isDurableSubscriber() {
  		// Add back into plain subscribers
  		ss.psubs = append(ss.psubs, sub)
  	}
  	// And in ackInbox lookup map.
  	ss.acks[sub.AckInbox] = sub
  	ss.Unlock()
  
  	return nil
  }
docs: // updateDurable adds back `sub` to the client and updates the store.
  // No lock is needed for `sub` since it has just been created.