b=522416; hang fix followup; r=bz
authorShawn Wilsher <sdwilsh@shawnwilsher.com>
Sun, 18 Oct 2009 13:40:49 -0700
changeset 34242 001a1805c476e1a9dc443ee547145b849be07463
parent 34241 ba0ca9a1c14c9a16fe9ac4ba30880a2240148652
child 34243 05c14c8326beaa37a976b080ccebb3312e6e716f
push id115
push userbmcbride@mozilla.com
push dateMon, 19 Oct 2009 23:27:00 +0000
reviewersbz
bugs522416
milestone1.9.3a1pre
b=522416; hang fix followup; r=bz
netwerk/base/src/NetUtil.jsm
--- a/netwerk/base/src/NetUtil.jsm
+++ b/netwerk/base/src/NetUtil.jsm
@@ -150,24 +150,25 @@ const NetUtil = {
             );
             throw exception;
         }
 
         // Create a pipe that will create our output stream that we can use once
         // we have gotten all the data.
         let pipe = Cc["@mozilla.org/pipe;1"].
                    createInstance(Ci.nsIPipe);
-        pipe.init(false, false, 0, PR_UINT32_MAX, null);
+        pipe.init(true, true, 0, PR_UINT32_MAX, null);
 
         // Create a listener that will give data to the pipe's output stream.
         let listener = Cc["@mozilla.org/network/simple-stream-listener;1"].
                        createInstance(Ci.nsISimpleStreamListener);
         listener.init(pipe.outputStream, {
             onStartRequest: function(aRequest, aContext) {},
             onStopRequest: function(aRequest, aContext, aStatusCode) {
+                pipe.outputStream.close();
                 aCallback(pipe.inputStream, aStatusCode);
             }
         });
 
         aChannel.asyncOpen(listener, null);
     },
 
     /**