Skip to content

Commit

Permalink
Fix ordering issue
Browse files Browse the repository at this point in the history
  • Loading branch information
gjcairo committed Nov 12, 2024
1 parent 71a7450 commit e110eb3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,8 @@ extension GRPCClientStreamHandler {
// machine) then return.
if self.requestFinished { return }

self.requestFinished = true

// Write an empty data frame with the EOS flag set, to signal the RPC
// request is now finished.
context.write(
Expand All @@ -280,7 +282,6 @@ extension GRPCClientStreamHandler {
promise: nil
)
context.flush()
self.requestFinished = true
break loop

case .awaitMoreMessages:
Expand Down

0 comments on commit e110eb3

Please sign in to comment.