Close will shut down the sync client and all attached work, and block until shutdown is complete. This will block if the Start() has not created the main background loop.
()
| 563 | // Close will shut down the sync client and all attached work, and block until shutdown is complete. |
| 564 | // This will block if the Start() has not created the main background loop. |
| 565 | func (s *SyncClient) Close() error { |
| 566 | s.lock.Lock() |
| 567 | s.closingPeers = true |
| 568 | s.lock.Unlock() |
| 569 | s.resCancel() |
| 570 | s.wg.Wait() |
| 571 | s.cleanTasks() |
| 572 | s.report(true) |
| 573 | s.saveSyncStatus() |
| 574 | return nil |
| 575 | } |
| 576 | |
| 577 | func (s *SyncClient) RequestL2Range(start, end uint64) (uint64, error) { |
| 578 | for _, pr := range s.peers { |
nothing calls this directly
no test coverage detected