Cancel timed out 9P reads

This commit is contained in:
Ollie Agent 2026-08-17 17:41:55 +02:00
parent c652c562c3
commit 6131fad5c5
1 changed files with 2 additions and 0 deletions

View File

@ -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")
}
}