Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions Sources/GRPCCore/Call/Client/Internal/ClientStreamExecutor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,18 @@ internal enum ClientStreamExecutor {
return .failed(error)

case .none:
let error = RPCError(
code: .internalError,
message: """
Invalid stream. The transport returned an empty stream. This is likely to be \
a transport-specific bug.
"""
)
return .failed(error)
if Task.isCancelled {
throw CancellationError()
} else {
let error = RPCError(
code: .internalError,
message: """
Invalid stream. The transport returned an empty stream. This is likely to be \
a transport-specific bug.
"""
)
return .failed(error)
}
}
}.castError(to: RPCError.self) { error in
RPCError(
Expand Down
Loading
Loading