Index: net/quic/quic_stream_factory.cc |
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc |
index 0127d581c417673541c096e01def6ead7aa31bfa..44ed85a3cd0a84e07132486034300dc472a922cb 100644 |
--- a/net/quic/quic_stream_factory.cc |
+++ b/net/quic/quic_stream_factory.cc |
@@ -722,16 +722,18 @@ int QuicStreamFactory::CreateSession( |
// does not consume "too much" memory. If we see bursty packet loss, we may |
// revisit this setting and test for its impact. |
const int32 kSocketBufferSize(TcpReceiver::kReceiveWindowTCP); |
- if (!socket->SetReceiveBufferSize(kSocketBufferSize)) { |
+ rv = socket->SetReceiveBufferSize(kSocketBufferSize); |
+ if (rv != OK) { |
HistogramCreateSessionFailure(CREATION_ERROR_SETTING_RECEIVE_BUFFER); |
- return ERR_SOCKET_SET_RECEIVE_BUFFER_SIZE_ERROR; |
+ return rv; |
} |
// Set a buffer large enough to contain the initial CWND's worth of packet |
// to work around the problem with CHLO packets being sent out with the |
// wrong encryption level, when the send buffer is full. |
- if (!socket->SetSendBufferSize(kMaxPacketSize * 20)) { |
+ rv = socket->SetSendBufferSize(kMaxPacketSize * 20); |
+ if (rv != OK) { |
HistogramCreateSessionFailure(CREATION_ERROR_SETTING_SEND_BUFFER); |
- return ERR_SOCKET_SET_SEND_BUFFER_SIZE_ERROR; |
+ return rv; |
} |
scoped_ptr<QuicDefaultPacketWriter> writer( |