[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit c338696cb6bd9de6a047d7185c5b18e6a5033db1
Author: Kathy Brade <brade@xxxxxxxxxxxxxxxxx>
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);



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits