diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-30 16:36:02 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-30 16:36:02 +0000 |
commit | bce9f68396175be6df5988a668fb814be762470c (patch) | |
tree | 427cb13189d61201d4f0cc97d1aa6d731a5c4125 /net/spdy | |
parent | 15367d0a63dd2bfd43d473bb11cd1bf34dea212d (diff) | |
download | chromium_src-bce9f68396175be6df5988a668fb814be762470c.zip chromium_src-bce9f68396175be6df5988a668fb814be762470c.tar.gz chromium_src-bce9f68396175be6df5988a668fb814be762470c.tar.bz2 |
SPDY: Improve logging messages for SpdySession.
Review URL: http://codereview.chromium.org/1582001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43087 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy')
-rw-r--r-- | net/spdy/spdy_session.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc index 9362917..2607f90 100644 --- a/net/spdy/spdy_session.cc +++ b/net/spdy/spdy_session.cc @@ -544,8 +544,11 @@ void SpdySession::OnReadComplete(int bytes_read) { if (bytes_read <= 0) { // Session is tearing down. net::Error error = static_cast<net::Error>(bytes_read); - if (error == OK) + if (bytes_read == 0) { + LOG(INFO) << "Spdy socket closed by server[" << + host_port_pair().ToString() << "]."; error = ERR_CONNECTION_CLOSED; + } CloseSessionOnError(error); return; } @@ -730,7 +733,7 @@ void SpdySession::WriteSocket() { } void SpdySession::CloseAllStreams(net::Error code) { - LOG(INFO) << "Closing all SPDY Streams"; + LOG(INFO) << "Closing all SPDY Streams for " << host_port_pair().ToString(); static StatsCounter abandoned_streams("spdy.abandoned_streams"); static StatsCounter abandoned_push_streams("spdy.abandoned_push_streams"); @@ -780,7 +783,8 @@ int SpdySession::GetNewStreamId() { void SpdySession::CloseSessionOnError(net::Error err) { DCHECK_LT(err, OK); - LOG(INFO) << "spdy::CloseSessionOnError(" << err << ")"; + LOG(INFO) << "spdy::CloseSessionOnError(" << err << ") for " << + host_port_pair().ToString(); // Don't close twice. This can occur because we can have both // a read and a write outstanding, and each can complete with @@ -1082,6 +1086,8 @@ void SpdySession::OnFin(const spdy::SpdyRstStreamControlFrame& frame) { } void SpdySession::OnGoAway(const spdy::SpdyGoAwayControlFrame& frame) { + LOG(INFO) << "Spdy GOAWAY for session[" << this << "] for " << + host_port_pair().ToString(); session_->spdy_session_pool()->Remove(this); // TODO(willchan): Cancel any streams that are past the GoAway frame's |