Folks,
I've been combing through the code in call.go and clientconn.go. The basic scenario we're seeing, is if we use grpc.Invoke to invoke a gRPC method on a server, and that server crashes and restarts during the invocation, the grpc.Invoke never returns. I've used kill -6 to get the callstack
goroutine 20 [select, 13 minutes]:
google.golang.org/grpc.Invoke(0x7f72290d6180, 0xc208156330, 0xc2080f80c0, 0x33, 0x6ef6c0, 0xc20813acc0, 0x6ef720, 0xc20813acd0, 0xc208137040, 0x0, ...)
main.(*adapter).Call(0xc20805c360, 0x7f72290d6180, 0xc208156330, 0xc2081565d0, 0x22, 0xa97eb0, 0x0, 0x0, 0x0, 0x0, ...)
It seems like what happens, is that while waiting for the response the connection terminates, which triggers a connection error here
It then continues and gets stuck waiting here:
The connection is dialed and connects, but it never proceeds past that point. I noticed the failFast CallOption doesn't seem to be available yet. What would the correct way be to ensure that Invoke returns and doesn't hang indefinitely if the first attempt results in a terminated connection?