Commit 3ea5a0d7 authored by rjshade@chromium.org's avatar rjshade@chromium.org

Move construction of flow_controller_ to QuicSession constructor to avoid...

Move construction of flow_controller_ to QuicSession constructor to avoid streams being initialized with a NULL ptr.
BUG=

Review URL: https://codereview.chromium.org/442943002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287700 0039d316-1c4b-4281-b951-d872f2087c98
parent f9c55174
...@@ -106,9 +106,6 @@ QuicSession::QuicSession(QuicConnection* connection, const QuicConfig& config) ...@@ -106,9 +106,6 @@ QuicSession::QuicSession(QuicConnection* connection, const QuicConfig& config)
goaway_received_(false), goaway_received_(false),
goaway_sent_(false), goaway_sent_(false),
has_pending_handshake_(false) { has_pending_handshake_(false) {
}
void QuicSession::InitializeSession() {
if (connection_->version() <= QUIC_VERSION_19) { if (connection_->version() <= QUIC_VERSION_19) {
flow_controller_.reset(new QuicFlowController( flow_controller_.reset(new QuicFlowController(
connection_.get(), 0, is_server(), kDefaultFlowControlSendWindow, connection_.get(), 0, is_server(), kDefaultFlowControlSendWindow,
...@@ -120,7 +117,9 @@ void QuicSession::InitializeSession() { ...@@ -120,7 +117,9 @@ void QuicSession::InitializeSession() {
config_.GetInitialSessionFlowControlWindowToSend(), config_.GetInitialSessionFlowControlWindowToSend(),
config_.GetInitialSessionFlowControlWindowToSend())); config_.GetInitialSessionFlowControlWindowToSend()));
} }
}
void QuicSession::InitializeSession() {
connection_->set_visitor(visitor_shim_.get()); connection_->set_visitor(visitor_shim_.get());
connection_->SetFromConfig(config_); connection_->SetFromConfig(config_);
if (connection_->connected()) { if (connection_->connected()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment