diff --git a/cmd/swarm/swarm-smoke/upload_and_sync.go b/cmd/swarm/swarm-smoke/upload_and_sync.go index 1733d19bdc..b490098809 100644 --- a/cmd/swarm/swarm-smoke/upload_and_sync.go +++ b/cmd/swarm/swarm-smoke/upload_and_sync.go @@ -40,6 +40,12 @@ func cliUploadAndSync(c *cli.Context) error { log.Info("uploaded successfully", "hash", hash, "digest", fmt.Sprintf("%x", fhash)) + if filesize < 10 { + time.Sleep(15 * time.Second) + } else { + time.Sleep(2 * time.Duration(filesize) * time.Second) + } + wg := sync.WaitGroup{} for _, endpoint := range endpoints { endpoint := endpoint @@ -66,7 +72,7 @@ func cliUploadAndSync(c *cli.Context) error { // fetch is getting the requested `hash` from the `endpoint` and compares it with the `original` file func fetch(hash string, endpoint string, original []byte, ruid string) error { log.Trace("sleeping", "ruid", ruid) - time.Sleep(10 * time.Second) + time.Sleep(1 * time.Second) log.Trace("http get request", "ruid", ruid, "api", endpoint, "hash", hash) res, err := http.Get(endpoint + "/bzz:/" + hash + "/") diff --git a/swarm/storage/chunker.go b/swarm/storage/chunker.go index 40af0499fa..b01d724e15 100644 --- a/swarm/storage/chunker.go +++ b/swarm/storage/chunker.go @@ -538,7 +538,7 @@ func (self *LazyChunkReader) join(b []byte, off int64, eoff int64, depth int, tr func (self *LazyChunkReader) Read(b []byte) (read int, err error) { log.Debug("lazychunkreader.read", "key", self.key) read, err = self.ReadAt(b, self.off) - if err != nil { + if err != nil && err != io.EOF { log.Error("lazychunkreader.readat", "read", read, "err", err) }