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

Unified Diff: milo/appengine/buildbot/grpc.go

Issue 2349833003: Milo: master grpc endpoint fix (Closed)
Patch Set: Created 4 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: milo/appengine/buildbot/grpc.go
diff --git a/milo/appengine/buildbot/grpc.go b/milo/appengine/buildbot/grpc.go
index 9cc1755dedf4c7353d9b080b1ccdcbe0a5a553a0..9ccee6c8fc59cd57edd9c09a83bae0b814f9cec5 100644
--- a/milo/appengine/buildbot/grpc.go
+++ b/milo/appengine/buildbot/grpc.go
@@ -93,12 +93,13 @@ func (s *BuildbotService) GetCompressedMasterJSON(
// And re-compress it.
gzbs := bytes.Buffer{}
gsw := gzip.NewWriter(&gzbs)
- defer gsw.Close()
cw := iotools.CountingWriter{Writer: gsw}
e := json.NewEncoder(&cw)
if err := e.Encode(master); err != nil {
+ gsw.Close()
return nil, err
}
+ gsw.Close()
logging.Infof(c, "Returning %d bytes", cw.Count)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698