code: func (s *syncServer) run() error {
  	heartbeat := time.NewTicker(s.heartbeatInterval)
  	for {
  		select {
  		case <-heartbeat.C:
  			now := time.Now()
  			s.sessionLock.Lock()
  			for id, ss := range s.sessions {
  				ss.RLock()
  				expiry := ss.expiryTime
  				ss.RUnlock()
  				if now.After(expiry) {
  					log.Warningf("Sync session %d with %v has expired", id, ss.node)
  					delete(s.sessions, id)
  					continue
  				}
  				ss.addNote(&SyncNote{Type: SNTHeartbeat})
  			}
  			s.sessionLock.Unlock()
  		}
  	}
  }
docs: // run runs the synchronisation server, which is responsible for queueing
  // heartbeat notifications and removing expired synchronisation sessions.