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

Unified Diff: logdog/client/coordinator/stream.go

Issue 2671633002: Update LogDog client to export its host. (Closed)
Patch Set: Created 3 years, 11 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 | « logdog/client/coordinator/client.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: logdog/client/coordinator/stream.go
diff --git a/logdog/client/coordinator/stream.go b/logdog/client/coordinator/stream.go
index 6142af651df9cf0ded2a49c729e2c7d92b95a725..c93e3f40cc56865754d70e70cb8720099a887776 100644
--- a/logdog/client/coordinator/stream.go
+++ b/logdog/client/coordinator/stream.go
@@ -314,9 +314,15 @@ func loadStatePointer(stateP *LogStream, resp *logdog.GetResponse) error {
return nil
}
+ // The service should always return this when requested, but handle the case
+ // where it doesn't for completeness.
+ if resp.Desc == nil {
+ return errors.New("descriptor was not returned")
+ }
+
ls, err := loadLogStream(resp.Project, resp.Desc.Path(), resp.State, resp.Desc)
if err != nil {
- return fmt.Errorf("failde to load stream state: %v", err)
+ return fmt.Errorf("failed to load stream state: %v", err)
}
*stateP = *ls
« no previous file with comments | « logdog/client/coordinator/client.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698