summaryrefslogtreecommitdiffstats
path: root/net/quic/quic_session.cc
diff options
context:
space:
mode:
authorrtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-04 22:20:12 +0000
committerrtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-04 22:20:12 +0000
commit69dfd1b5eb1873e1761b5904b42ebbae67b51a65 (patch)
tree8cb9f4ad815f4aeec9b5172842ec275ec37e40db /net/quic/quic_session.cc
parentb27b193112e0e236b48667ade7493416b21b5edd (diff)
downloadchromium_src-69dfd1b5eb1873e1761b5904b42ebbae67b51a65.zip
chromium_src-69dfd1b5eb1873e1761b5904b42ebbae67b51a65.tar.gz
chromium_src-69dfd1b5eb1873e1761b5904b42ebbae67b51a65.tar.bz2
Revert 204046 "Land Recent QUIC changes."
> Land Recent QUIC changes. > > Merge internal change: 47341065 > > Fix to ensure the version matches before declaring that the public header > flags exceed the max value. b/9190456 > > Merge internal change: 47324563 > > Fixing another backup bug (exposed by the last fix) that if we failed to > write a standalone fin the stream would not be marked as write blocked. > > Merge internal change: 47272116 > > Don't add QuicStreams to ActiveSessionList; Instead call DumpSession on > alive streams via QuicSession. > > Merge internal change: 47226512 > > Making the packet sequence number variable length to minimize bytes on the wire. > > Merge internal change: 47220850 > > Fixing a bug in quic stream where we'd send rst stream packets for > successful streams. The fin bit should be sufficient for both good > request/response pairs and early response pairs. > > Merge internal change: 47086343 > > Don't let FEC packets consume congestion window forever. If a FEC packet > is not acked after a certain time, it is cleared from the congestion > window. This timeout is higher than normal RTO. > > Merge internal change: 47056082 > > Add QuicSession to ActiveSessionList. > > Merge internal change: 47048300 > > Fixing a backup/resumption bug in QUIC. > > It's possible to have a full congestion window worth of packets on the wire. > > If we are in this state and a session tries to SendStreamData, the > QuicPacketGenerator short-circuits without queuing packets because it checks > to see if the connection CanWrite. > > When we get an ack, we check to see if we have locally queued packets, but > never call OnCanWrite on the session to clear any streams which write blocked > without queueing packets. > > Merge internal change: 47000173 > > QUIC: wire up the server-nonce parameters to the server config. > > Merge internal change: 46985067 > > R=rch@chromium.org > > Review URL: https://codereview.chromium.org/16256017 TBR=rtenneti@chromium.org Review URL: https://codereview.chromium.org/16374004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204062 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/quic/quic_session.cc')
-rw-r--r--net/quic/quic_session.cc23
1 files changed, 8 insertions, 15 deletions
diff --git a/net/quic/quic_session.cc b/net/quic/quic_session.cc
index 3df8b0a..2ed5b07 100644
--- a/net/quic/quic_session.cc
+++ b/net/quic/quic_session.cc
@@ -14,8 +14,6 @@ using std::vector;
namespace net {
-#define ENDPOINT (is_server_ ? "Server: " : " Client: ")
-
// We want to make sure we delete any closed streams in a safe manner.
// To avoid deleting a stream in mid-operation, we have a simple shim between
// us and the stream, so we can delete any streams when we return from
@@ -76,7 +74,6 @@ QuicSession::QuicSession(QuicConnection* connection,
next_stream_id_(is_server ? 2 : 3),
is_server_(is_server),
largest_peer_created_stream_id_(0),
- error_(QUIC_NO_ERROR),
goaway_received_(false),
goaway_sent_(false) {
set_max_open_streams(config_.max_streams_per_connection());
@@ -98,7 +95,7 @@ bool QuicSession::OnPacket(const IPEndPoint& self_address,
const QuicPacketHeader& header,
const vector<QuicStreamFrame>& frames) {
if (header.public_header.guid != connection()->guid()) {
- DLOG(INFO) << ENDPOINT << "Got packet header for invalid GUID: "
+ DLOG(INFO) << "Got packet header for invalid GUID: "
<< header.public_header.guid;
return false;
}
@@ -152,17 +149,13 @@ void QuicSession::OnGoAway(const QuicGoAwayFrame& frame) {
}
void QuicSession::ConnectionClose(QuicErrorCode error, bool from_peer) {
- if (error_ == QUIC_NO_ERROR) {
- error_ = error;
- }
-
while (stream_map_.size() != 0) {
ReliableStreamMap::iterator it = stream_map_.begin();
QuicStreamId id = it->first;
it->second->ConnectionClose(error, from_peer);
// The stream should call CloseStream as part of ConnectionClose.
if (stream_map_.find(id) != stream_map_.end()) {
- LOG(DFATAL) << ENDPOINT << "Stream failed to close under ConnectionClose";
+ LOG(DFATAL) << "Stream failed to close under ConnectionClose";
CloseStream(id);
}
}
@@ -208,11 +201,11 @@ void QuicSession::SendGoAway(QuicErrorCode error_code, const string& reason) {
}
void QuicSession::CloseStream(QuicStreamId stream_id) {
- DLOG(INFO) << ENDPOINT << "Closing stream " << stream_id;
+ DLOG(INFO) << "Closing stream " << stream_id;
ReliableStreamMap::iterator it = stream_map_.find(stream_id);
if (it == stream_map_.end()) {
- DLOG(INFO) << ENDPOINT << "Stream is already closed: " << stream_id;
+ DLOG(INFO) << "Stream is already closed: " << stream_id;
return;
}
ReliableQuicStream* stream = it->second;
@@ -244,7 +237,7 @@ void QuicSession::OnCryptoHandshakeEvent(CryptoHandshakeEvent event) {
break;
case HANDSHAKE_CONFIRMED:
- LOG_IF(DFATAL, !config_.negotiated()) << ENDPOINT
+ LOG_IF(DFATAL, !config_.negotiated())
<< "Handshake confirmed without parameter negotiation.";
connection_->SetIdleNetworkTimeout(
config_.idle_connection_state_lifetime());
@@ -253,7 +246,7 @@ void QuicSession::OnCryptoHandshakeEvent(CryptoHandshakeEvent event) {
break;
default:
- LOG(ERROR) << ENDPOINT << "Got unknown handshake event: " << event;
+ LOG(ERROR) << "Got unknown handshake event: " << event;
}
}
@@ -262,8 +255,8 @@ QuicConfig* QuicSession::config() {
}
void QuicSession::ActivateStream(ReliableQuicStream* stream) {
- DLOG(INFO) << ENDPOINT << "num_streams: " << stream_map_.size()
- << ". activating " << stream->id();
+ DLOG(INFO) << "num_streams: " << stream_map_.size()
+ << ". activating " << stream->id();
DCHECK(stream_map_.count(stream->id()) == 0);
stream_map_[stream->id()] = stream;
}