On Wednesday, February 28, 2018 at 12:18:06 AM UTC+7, Doug Fawley wrote:
>
> Client-side, io.EOF is returned directly from grpc-go steram.Send() calls 
> when the server closes the stream.  At that point, Recv() should be called 
> until it returns a non-nil error to receive the server's messages and 
> eventually the status.  If io.EOF is returned by Recv(), that indicates a 
> success; otherwise that is the final status of the RPC.  All errors are 
> permanent from the standpoint of that stream -- subsequent streams are 
> possible using the same client, even if it is a connection error, as the 
> client automatically attempts to reconnect.  Make sure you always call 
> Recv() on the stream until you get a non-nil error or cancel the context 
> used when creating the stream, or else a goroutine and other resources will 
> be leaked.
>
> Let me know if you have any further questions.
>

Just to clarify, should with single directional streaming do we need to 
call RecvMsg after stream.Send returns io.EOF, to get any failure from the 
server? Only bidirectional streams have both a Send and Recv method.


-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To post to this group, send email to grpc-io@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/5f9425d2-ffc4-4b72-b732-434ea2940f1b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to