Client does not wait for Server response through grpc-go

114 Views Asked by At

I am trying to send a command from client to server using grpc-go. Server receives this command, execute the command (through cmd.Run() which takes few seconds) and if execution is successful returns the status back to client.

I have tried it with unary rpc. Server successfully executes the command but client does not wait for server and immediately throws the following error.

2023/10/24 09:06:05 Connection to server successful
2023/10/24 09:06:06 Could not receive response from server: **rpc error: code = DeadlineExceeded desc = context deadline exceeded
exit status 1**

Does any one know how can I resolve this error?

0

There are 0 best solutions below