summaryrefslogtreecommitdiffstats
path: root/net/quic/quic_connection_helper.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/quic/quic_connection_helper.cc')
-rw-r--r--net/quic/quic_connection_helper.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/net/quic/quic_connection_helper.cc b/net/quic/quic_connection_helper.cc
index e150017..16d2782 100644
--- a/net/quic/quic_connection_helper.cc
+++ b/net/quic/quic_connection_helper.cc
@@ -55,9 +55,16 @@ int QuicConnectionHelper::WritePacketToWire(
scoped_refptr<StringIOBuffer> buf(
new StringIOBuffer(std::string(packet.data(),
packet.length())));
- return socket_->Write(buf, packet.length(),
- base::Bind(&QuicConnectionHelper::OnWriteComplete,
- weak_factory_.GetWeakPtr()));
+ int rv = socket_->Write(buf, packet.length(),
+ base::Bind(&QuicConnectionHelper::OnWriteComplete,
+ weak_factory_.GetWeakPtr()));
+ if (rv >= 0) {
+ *error = 0;
+ } else {
+ *error = rv;
+ rv = -1;
+ }
+ return rv;
}
void QuicConnectionHelper::SetResendAlarm(