MCPcopy Create free account
hub / github.com/ethstorage/es-node / Close

Method Close

ethstorage/p2p/protocol/syncclient.go:565–575  ·  view source on GitHub ↗

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.

()

Source from the content-addressed store, hash-verified

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.
565func (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
577func (s *SyncClient) RequestL2Range(start, end uint64) (uint64, error) {
578 for _, pr := range s.peers {

Callers

nothing calls this directly

Calls 3

cleanTasksMethod · 0.95
reportMethod · 0.95
saveSyncStatusMethod · 0.95

Tested by

no test coverage detected