diff --git a/Sources/gRPC/Call.swift b/Sources/gRPC/Call.swift index c38900663..fa9040f42 100644 --- a/Sources/gRPC/Call.swift +++ b/Sources/gRPC/Call.swift @@ -219,11 +219,11 @@ public class Call { } operations = [ .sendInitialMetadata(metadata.copy()), + .sendMessage(ByteBuffer(data:message)), + .sendCloseFromClient, .receiveInitialMetadata, + .receiveMessage, .receiveStatusOnClient, - .sendMessage(ByteBuffer(data: message)), - .sendCloseFromClient, - .receiveMessage ] case .serverStreaming: guard let message = message else { @@ -231,14 +231,16 @@ public class Call { } operations = [ .sendInitialMetadata(metadata.copy()), + .sendMessage(ByteBuffer(data:message)), + .sendCloseFromClient, .receiveInitialMetadata, - .sendMessage(ByteBuffer(data: message)), - .sendCloseFromClient + .receiveStatusOnClient, ] case .clientStreaming, .bidiStreaming: operations = [ .sendInitialMetadata(metadata.copy()), - .receiveInitialMetadata + .receiveInitialMetadata, + .receiveStatusOnClient, ] } try perform(OperationGroup(call: self,