Open
Description
Question Checklist
- Updated grpc-swift to the latest version
- I read the Contribution Guidelines
- I read README
- I searched for existing GitHub issues (especially, there are many resolved issues related to SSL)
Question Subject
version: 1.0.0-alpha.9
I use gRPC Swift for developing an iOS app. When I call unary RPC under flight mode, I get a deadlineExceeded error but server receives the Unary request that should not be sent.
Would anyone tell me how to prevent sending request after I've got a call error, please?
Question Description
Process to reproduce:
- make connection and client:
let eventLoopGroup = MultiThreadedEventLoopGroup(numberOfThreads: 1)
let connectionConfig = ClientConnection.Configuration(target: .hostAndPort("example.com", 443), eventLoopGroup: eventLoopGroup)
let connection = ClientConnection(configuration: connectionConfig)
let service = MyServiceClient(connection: connection)
- turn on flight mode
- request Unary gRPC call and wait for the result:
let call = service.postSomething(MyRequest("✈️")) // UnaryCall
let callResultEventLoop = call.status.and(call.trailingMetadata).and(call.response)
callResultEventLoop.whenSuccess { _ in
print("Got a response.")
}
callResultEventLoop.whenFailure { error in
print("Got an error: \(error)")
}
- get an error log like below because it is under flight mode:
Got an error: deadlineExceeded (4): RPC timed out (timeout=10S) before completing
- turn off flight mode
- Unfortunately but server receives
"✈️"