notify queues a synchronisation notification with each of the active synchronisation sessions.
(sn *SyncNote)
| 300 | // notify queues a synchronisation notification with each of the active |
| 301 | // synchronisation sessions. |
| 302 | func (s *syncServer) notify(sn *SyncNote) { |
| 303 | s.sessionLock.RLock() |
| 304 | sessions := s.sessions |
| 305 | s.sessionLock.RUnlock() |
| 306 | for _, ss := range sessions { |
| 307 | ss.addNote(sn) |
| 308 | } |
| 309 | } |
| 310 | |
| 311 | // run runs the synchronisation server, which is responsible for queueing |
| 312 | // heartbeat notifications and removing expired synchronisation sessions. |