diff --git a/cmd/olliesrv/server.go b/cmd/olliesrv/server.go index b957df2..66e4b7a 100644 --- a/cmd/olliesrv/server.go +++ b/cmd/olliesrv/server.go @@ -608,8 +608,10 @@ func read(root *fs.Tree, cs *connState, fc *plan9.Fcall, ctx context.Context) *p f.readCache = r.data return readSlice(fc, r.data) case <-ctx.Done(): + entry.Close() return errFcall(fc, ctx.Err().Error()) case <-timer.C: + entry.Close() return errFcall(fc, "read timeout") } }