Skip to content

Commit

Permalink
Solve BWU failing problem when Multiplex is enabled
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 717982248
  • Loading branch information
hai007 authored and copybara-github committed Jan 21, 2025
1 parent 4b8ea5d commit d73d1d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/platform/blocking_queue_stream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit d73d1d0

Please sign in to comment.