[tor-commits] [torbutton/master] Bug #10201: FF ESR 24 hangs during exit on Mac OS.

mikeperry at torproject.org mikeperry at torproject.org
Wed Dec 4 00:19:30 UTC 2013


commit c338696cb6bd9de6a047d7185c5b18e6a5033db1
Author: Kathy Brade <brade at pearlcrescent.com>
Date:   Tue Dec 3 10:33:20 2013 -0500

    Bug #10201: FF ESR 24 hangs during exit on Mac OS.
    
    Close Tor control port socket streams before closing socket.
---
 src/chrome/content/torbutton.js |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/chrome/content/torbutton.js b/src/chrome/content/torbutton.js
index b47d394..3b76595 100644
--- a/src/chrome/content/torbutton.js
+++ b/src/chrome/content/torbutton.js
@@ -1373,7 +1373,10 @@ function torbutton_send_ctrl_cmd(command) {
       return null;
     }
 
-    socket.close(1);
+    // Closing these streams prevents a shutdown hang on Mac OS. See bug 10201.
+    inputStream.close();
+    outputStream.close();
+    socket.close(Components.results.NS_OK);
     return bytes.substr(4);
   } catch(e) {
     torbutton_log(4, "Exception on control port "+e);





More information about the tor-commits mailing list