grpc-go
grpc-go copied to clipboard
Unable to Perform Server-Side Stream Initialization Checks in gRPC Client-Side Streaming RPC to return error on stream creation
I'm currently working on a gRPC implementation where the client is in Go, and the server is in C++. I have a client-side streaming RPC, and I want to perform some checks on the server when the client creates a new stream. Specifically, I want the server to return an error if it is busy.
However, I've observed that the server code only executes when the client starts sending requests, not during the creation of the stream itself. To overcome this, I had to send a dummy message to the server to check if it is busy or not.
Is this the expected behavior in gRPC, or am I missing something in my implementation?