mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 09:23:48 +00:00
swarm/network/stream: add Client.Close() (#229)
This commit is contained in:
parent
f568ef178e
commit
5b19c2273f
2 changed files with 4 additions and 0 deletions
|
|
@ -298,6 +298,7 @@ type client struct {
|
|||
type Client interface {
|
||||
NeedData([]byte) func()
|
||||
BatchDone(string, uint64, []byte, []byte) func() (*TakeoverProof, error)
|
||||
Close()
|
||||
}
|
||||
|
||||
// nextBatch adjusts the indexes by inspecting the intervals
|
||||
|
|
@ -344,6 +345,7 @@ func (c *client) batchDone(p *Peer, req *OfferedHashesMsg, hashes []byte) error
|
|||
|
||||
func (c *client) close() {
|
||||
close(c.next)
|
||||
c.Close()
|
||||
}
|
||||
|
||||
// Spec is the spec of the streamer protocol
|
||||
|
|
|
|||
|
|
@ -253,3 +253,5 @@ func (s *SwarmSyncerClient) TakeoverProof(streamName string, from uint64, hashes
|
|||
Sig: nil,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (s *SwarmSyncerClient) Close() {}
|
||||
|
|
|
|||
Loading…
Reference in a new issue