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

Side by Side Diff: net/spdy/spdy_session.cc

Issue 1628353002: Send socket read error in GOAWAY. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/spdy/spdy_session.h" 5 #include "net/spdy/spdy_session.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <utility> 10 #include <utility>
(...skipping 1473 matching lines...) Expand 10 before | Expand all | Expand 10 after
1484 1484
1485 if (result == 0) { 1485 if (result == 0) {
1486 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.SpdySession.BytesRead.EOF", 1486 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.SpdySession.BytesRead.EOF",
1487 total_bytes_received_, 1, 100000000, 50); 1487 total_bytes_received_, 1, 100000000, 50);
1488 DoDrainSession(ERR_CONNECTION_CLOSED, "Connection closed"); 1488 DoDrainSession(ERR_CONNECTION_CLOSED, "Connection closed");
1489 1489
1490 return ERR_CONNECTION_CLOSED; 1490 return ERR_CONNECTION_CLOSED;
1491 } 1491 }
1492 1492
1493 if (result < 0) { 1493 if (result < 0) {
1494 DoDrainSession(static_cast<Error>(result), "result is < 0."); 1494 DoDrainSession(
1495 static_cast<Error>(result),
1496 base::StringPrintf("Error %d reading from socket.", -result));
1495 return result; 1497 return result;
1496 } 1498 }
1497 CHECK_LE(result, kReadBufferSize); 1499 CHECK_LE(result, kReadBufferSize);
1498 total_bytes_received_ += result; 1500 total_bytes_received_ += result;
1499 1501
1500 last_activity_time_ = time_func_(); 1502 last_activity_time_ = time_func_();
1501 1503
1502 DCHECK(buffered_spdy_framer_.get()); 1504 DCHECK(buffered_spdy_framer_.get());
1503 char* data = read_buffer_->data(); 1505 char* data = read_buffer_->data();
1504 while (result > 0) { 1506 while (result > 0) {
(...skipping 1768 matching lines...) Expand 10 before | Expand all | Expand 10 after
3273 if (!queue->empty()) { 3275 if (!queue->empty()) {
3274 SpdyStreamId stream_id = queue->front(); 3276 SpdyStreamId stream_id = queue->front();
3275 queue->pop_front(); 3277 queue->pop_front();
3276 return stream_id; 3278 return stream_id;
3277 } 3279 }
3278 } 3280 }
3279 return 0; 3281 return 0;
3280 } 3282 }
3281 3283
3282 } // namespace net 3284 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698