Cancel timed out 9P reads
This commit is contained in:
parent
c652c562c3
commit
6131fad5c5
|
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue