bug 1041272 - websockets partial last frame stall r=jduell
authorPatrick McManus <mcmanus@ducksong.com>
Fri, 25 Jul 2014 20:37:02 -0400
changeset 217853 c809045c156ab35b73ab6732c5acb45b4b556ef8
parent 217852 3928403b66274f62cc97bc5f145be7a3c4a4ae25
child 217854 a660ebbe6ff97b428c78f5f4e5921b094e57afb1
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjduell
bugs1041272
milestone34.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 1041272 - websockets partial last frame stall r=jduell
netwerk/protocol/websocket/WebSocketChannel.cpp
--- a/netwerk/protocol/websocket/WebSocketChannel.cpp
+++ b/netwerk/protocol/websocket/WebSocketChannel.cpp
@@ -3262,28 +3262,30 @@ WebSocketChannel::OnOutputStreamReady(ns
 
     if (mHdrOut) {
       if (amtSent == toSend) {
         mHdrOut = nullptr;
         mHdrOutToSend = 0;
       } else {
         mHdrOut += amtSent;
         mHdrOutToSend -= amtSent;
+        mSocketOut->AsyncWait(this, 0, 0, mSocketThread);
       }
     } else {
       if (amtSent == toSend) {
         if (!mStopped) {
           mTargetThread->Dispatch(new CallAcknowledge(this,
                                                       mCurrentOut->Length()),
                                   NS_DISPATCH_NORMAL);
         }
         DeleteCurrentOutGoingMessage();
         PrimeNewOutgoingMessage();
       } else {
         mCurrentOutSent += amtSent;
+        mSocketOut->AsyncWait(this, 0, 0, mSocketThread);
       }
     }
   }
 
   if (mReleaseOnTransmit)
     ReleaseSession();
   return NS_OK;
 }