Skip to content

Commit

Permalink
add comment on Header() about nil metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
dfawley authored Aug 25, 2023
1 parent 9e2a636 commit 4a6d059
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ type Stream interface {
// status package.
type ClientStream interface {
// Header returns the header metadata received from the server if there
// is any. It blocks if the metadata is not ready to read.
// is any. It blocks if the metadata is not ready to read. If the metadata
// is nil and the error is also nil, then the stream was terminated without
// headers, and the status can be discovered by calling RecvMsg.
Header() (metadata.MD, error)
// Trailer returns the trailer metadata from the server, if there is any.
// It must only be called after stream.CloseAndRecv has returned, or
Expand Down

0 comments on commit 4a6d059

Please # to comment.