Bug 974785 - Fix -Wsometimes-uninitialized warning in nsHttpConnection.cpp. r=sworkman

This commit is contained in:
Chris Peterson 2014-02-19 21:54:14 -08:00
parent 91d5779d1b
commit 8e5e2743ce

View File

@ -310,8 +310,6 @@ npnComplete:
nsresult
nsHttpConnection::Activate(nsAHttpTransaction *trans, uint32_t caps, int32_t pri)
{
nsresult rv;
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
LOG(("nsHttpConnection::Activate [this=%p trans=%x caps=%x]\n",
this, trans, caps));
@ -348,6 +346,7 @@ nsHttpConnection::Activate(nsAHttpTransaction *trans, uint32_t caps, int32_t pri
// need to handle HTTP CONNECT tunnels if this is the first time if
// we are tunneling through a proxy
nsresult rv = NS_OK;
if (mConnInfo->UsingConnect() && !mCompletedProxyConnect) {
rv = SetupProxyConnect();
if (NS_FAILED(rv))
@ -364,13 +363,11 @@ nsHttpConnection::Activate(nsAHttpTransaction *trans, uint32_t caps, int32_t pri
mResponseTimeoutEnabled = mTransaction->ResponseTimeout() > 0 &&
mTransaction->ResponseTimeoutEnabled();
if (NS_SUCCEEDED(rv)) {
nsresult rv2 = StartShortLivedTCPKeepalives();
if (NS_WARN_IF(NS_FAILED(rv2))) {
LOG(("nsHttpConnection::Activate [%p] "
"StartShortLivedTCPKeepalives failed rv2[0x%x]",
this, rv2));
}
rv = StartShortLivedTCPKeepalives();
if (NS_WARN_IF(NS_FAILED(rv))) {
LOG(("nsHttpConnection::Activate [%p] "
"StartShortLivedTCPKeepalives failed rv[0x%x]",
this, rv));
}
rv = OnOutputStreamReady(mSocketOut);