diff options
Diffstat (limited to 'weed/mount/filehandle.go')
| -rw-r--r-- | weed/mount/filehandle.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/weed/mount/filehandle.go b/weed/mount/filehandle.go index b2459d9e2..5d1552ce6 100644 --- a/weed/mount/filehandle.go +++ b/weed/mount/filehandle.go @@ -77,6 +77,10 @@ func (fh *FileHandle) AddChunks(chunks []*filer_pb.FileChunk) { fh.entryLock.Lock() defer fh.entryLock.Unlock() + if fh.entry == nil { + return + } + // find the earliest incoming chunk newChunks := chunks earliestChunk := newChunks[0] @@ -86,10 +90,6 @@ func (fh *FileHandle) AddChunks(chunks []*filer_pb.FileChunk) { } } - if fh.entry == nil { - return - } - // pick out-of-order chunks from existing chunks for _, chunk := range fh.entry.Chunks { if lessThan(earliestChunk, chunk) { |
