Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(484)

Unified Diff: blimp/net/blimp_message_output_buffer.cc

Issue 1909143002: Use ConnectionErrorObserver, not callbacks, for error handling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed haibinlu feedback. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: blimp/net/blimp_message_output_buffer.cc
diff --git a/blimp/net/blimp_message_output_buffer.cc b/blimp/net/blimp_message_output_buffer.cc
index b5c5ec5612b0f8c0a45fe4860160369540325fda..0aeb15e44df0cfaddee700cd1ac1db36681fa3f3 100644
--- a/blimp/net/blimp_message_output_buffer.cc
+++ b/blimp/net/blimp_message_output_buffer.cc
@@ -144,17 +144,13 @@ void BlimpMessageOutputBuffer::WriteNextMessageIfReady() {
}
void BlimpMessageOutputBuffer::OnWriteComplete(int result) {
- DCHECK_LE(result, net::OK);
- VLOG(2) << "Write complete, result=" << result;
+ DCHECK_LE(result, 0);
+ VLOG(2) << "Write result=" << net::ErrorToString(result);
if (result == net::OK) {
ack_buffer_.push_back(std::move(write_buffer_.front()));
write_buffer_.pop_front();
WriteNextMessageIfReady();
- } else {
- // An error occurred while writing to the network connection.
- // Stop writing more messages until a new connection is established.
- DLOG(WARNING) << "Write error (result=" << result << ")";
}
}
« blimp/net/blimp_connection_unittest.cc ('K') | « blimp/net/blimp_connection_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698