Chromium Code Reviews| Index: net/spdy/spdy_proxy_client_socket.cc |
| =================================================================== |
| --- net/spdy/spdy_proxy_client_socket.cc (revision 112347) |
| +++ net/spdy/spdy_proxy_client_socket.cc (working copy) |
| @@ -128,8 +128,7 @@ |
| } |
| bool SpdyProxyClientSocket::IsConnectedAndIdle() const { |
| - return IsConnected() && spdy_stream_.get() != NULL && |
| - !spdy_stream_->is_idle(); |
| + return IsConnected() && spdy_stream_ && !spdy_stream_->is_idle(); |
| } |
| const BoundNetLog& SpdyProxyClientSocket::NetLog() const { |
| @@ -265,13 +264,15 @@ |
| int SpdyProxyClientSocket::GetPeerAddress(AddressList* address) const { |
| if (!IsConnected()) |
| return ERR_SOCKET_NOT_CONNECTED; |
| - return spdy_stream_->GetPeerAddress(address); |
| + *address = peer_address_; |
|
wtc
2011/12/01 22:22:15
Is it normal for spdy_stream_ to become NULL when
Ryan Hamilton
2011/12/02 22:24:13
It was, but because of the change you suggested th
|
| + return OK; |
| } |
| int SpdyProxyClientSocket::GetLocalAddress(IPEndPoint* address) const { |
| if (!IsConnected()) |
| return ERR_SOCKET_NOT_CONNECTED; |
| - return spdy_stream_->GetLocalAddress(address); |
| + *address = local_address_; |
| + return OK; |
| } |
| void SpdyProxyClientSocket::OnIOComplete(int result) { |
| @@ -389,6 +390,9 @@ |
| return ERR_TUNNEL_CONNECTION_FAILED; |
| next_state_ = STATE_OPEN; |
| + spdy_stream_->GetPeerAddress(&peer_address_); |
| + spdy_stream_->GetLocalAddress(&local_address_); |
| + |
| if (net_log_.IsLoggingAllEvents()) { |
| net_log_.AddEvent( |
| NetLog::TYPE_HTTP_TRANSACTION_READ_TUNNEL_RESPONSE_HEADERS, |