Solve BWU failing problem when Multiplex is enabled

PiperOrigin-RevId: 717982248
This commit is contained in:
hai007
2025-01-21 10:45:21 -08:00
committed by Copybara-Service
parent 4b8ea5db74
commit d73d1d0515
+2 -2
View File
@@ -41,13 +41,13 @@ ExceptionOr<ByteArray> BlockingQueueStream::Read(std::int64_t size) {
if (is_closed_) {
LOG(INFO)
<< "Failed to read BlockingQueueStream because it was closed.";
return ExceptionOr<ByteArray>(Exception::kInterrupted);
return ExceptionOr<ByteArray>(Exception::kIo);
}
ByteArray bytes = queue_head_.Empty() ? blocking_queue_.Take() : queue_head_;
if (bytes == queue_end_) {
LOG(INFO) << "BlockingQueueStream is Interrupted.";
return ExceptionOr<ByteArray>(Exception::kInterrupted);
return ExceptionOr<ByteArray>(Exception::kIo);
}
int copy_len = std::min<int>(size, bytes.size());