Skip to content

Commit

Permalink
plan9/client: make Read return quickly (9fans#116)
Browse files Browse the repository at this point in the history
Satisfy requirement of https://pkg.go.dev/io#Reader:

Read conventionally returns what is available instead of waiting for more.

Fixes 9fans#115.
  • Loading branch information
bbriano authored May 30, 2024
1 parent 03bb196 commit 510f6a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plan9/client/fid_p9p.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (fid *Fid) Qid() plan9.Qid {
}

func (fid *Fid) Read(b []byte) (n int, err error) {
return fid.ReadAt(b, -1)
return fid.readAt(b, -1)
}

func (fid *Fid) ReadAt(b []byte, offset int64) (n int, err error) {
Expand Down

0 comments on commit 510f6a0

Please sign in to comment.