aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/storage/chunker.go
diff options
context:
space:
mode:
Diffstat (limited to 'swarm/storage/chunker.go')
-rw-r--r--swarm/storage/chunker.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/swarm/storage/chunker.go b/swarm/storage/chunker.go
index d55875369..563793e98 100644
--- a/swarm/storage/chunker.go
+++ b/swarm/storage/chunker.go
@@ -156,14 +156,12 @@ func (self *TreeChunker) Split(data io.Reader, size int64, chunkC chan *Chunk, s
close(errC)
}()
- select {
- case err := <-errC:
- if err != nil {
- close(quitC)
- return nil, err
- }
- //TODO: add a timeout
+ //TODO: add a timeout
+ if err := <-errC; err != nil {
+ close(quitC)
+ return nil, err
}
+
return key, nil
}