Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[iomisc.ReadUntilMatch] check context cancellation between Reads
Previously if the context was cancelled, we leaked a Go routine that would continue running io.Copy() even after ReadUntilMatch returned. This is problematic since it would consume bytes from the underlying reader. Also: * Delete output argument to ReadUntilMatch. This was only used by one caller. That caller has been changed to tee the reader themselves. * Delete the ring package as it's no longer needed. Note this solution isn't perfect. If the underlying call to m.Read() blocks, ReadUntilMatch will not respect the context cancellation. See here for discussion of related issues: golang/go#20280. Bug: 66731 Change-Id: I09feffb098247927eb87b94da6e9143e163dfda0 Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/470197 Reviewed-by: Ina Huh <ihuh@google.com> Reviewed-by: Oliver Newman <olivernewman@google.com> Fuchsia-Auto-Submit: Gary Miguel <garymm@google.com> Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com>
- Loading branch information
Gary Miguel
authored and
CQ Bot
committed
Jan 13, 2021
1 parent
35d36e2
commit b774793
Showing
13 changed files
with
54 additions
and
334 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.