Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(332)

Unified Diff: common/isolatedclient/isolatedclient.go

Issue 2884413002: Ensure (de)compressor is always closed. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | common/isolatedclient/isolatedfake/isolatedfake.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: common/isolatedclient/isolatedclient.go
diff --git a/common/isolatedclient/isolatedclient.go b/common/isolatedclient/isolatedclient.go
index 50325f5a576b59ae35a1d88f992b782515b83edf..462da9c917fd3d909c70fd7b7bda963cad563622 100644
--- a/common/isolatedclient/isolatedclient.go
+++ b/common/isolatedclient/isolatedclient.go
@@ -349,6 +349,7 @@ func newCompressed(src io.ReadCloser) io.ReadCloser {
}
buf := make([]byte, 4096)
if _, err := io.CopyBuffer(compressor, src, buf); err != nil {
+ compressor.Close()
pw.CloseWithError(err)
return
}
« no previous file with comments | « no previous file | common/isolatedclient/isolatedfake/isolatedfake.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698