aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/storage/chunker.go
diff options
context:
space:
mode:
authorEgon Elbre <egonelbre@gmail.com>2017-08-09 01:34:35 +0800
committerEgon Elbre <egonelbre@gmail.com>2017-08-14 23:12:37 +0800
commit133de3d80659680dc051065cb3baddd92a4e45c5 (patch)
treecc67ede99634e335f8a07a5b0b084877cb8282d7 /swarm/storage/chunker.go
parent6ca59d98f88d4b4cc8bdeb2f023ff8c1fa228c6f (diff)
downloaddexon-133de3d80659680dc051065cb3baddd92a4e45c5.tar
dexon-133de3d80659680dc051065cb3baddd92a4e45c5.tar.gz
dexon-133de3d80659680dc051065cb3baddd92a4e45c5.tar.bz2
dexon-133de3d80659680dc051065cb3baddd92a4e45c5.tar.lz
dexon-133de3d80659680dc051065cb3baddd92a4e45c5.tar.xz
dexon-133de3d80659680dc051065cb3baddd92a4e45c5.tar.zst
dexon-133de3d80659680dc051065cb3baddd92a4e45c5.zip
swarm: fix megacheck warnings
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
}