()
| 50 | } |
| 51 | |
| 52 | func (s *Router) Close() { |
| 53 | s.mu.Lock() |
| 54 | defer s.mu.Unlock() |
| 55 | if s.closed { |
| 56 | return |
| 57 | } |
| 58 | s.closed = true |
| 59 | |
| 60 | for i := range s.slots { |
| 61 | s.fillSlot(&models.Slot{Id: i}, false, nil) |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | func (s *Router) GetSlots() []*models.Slot { |
| 66 | s.mu.RLock() |