[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor-launcher/master] Bug #10201: FF ESR 24 hangs during exit on Mac OS.
commit 2089f899c0c72fc6ebcf1a210e8a0a5571f62cc1
Author: Kathy Brade <brade@xxxxxxxxxxxxxxxxx>
Date: Tue Dec 3 10:38:50 2013 -0500
Bug #10201: FF ESR 24 hangs during exit on Mac OS.
Close Tor control port socket streams before closing socket.
Avoid throw inside the event monitor's onInputStreamReady() function.
---
src/components/tl-protocol.js | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/components/tl-protocol.js b/src/components/tl-protocol.js
index 2a68fbe..da56577 100644
--- a/src/components/tl-protocol.js
+++ b/src/components/tl-protocol.js
@@ -603,7 +603,14 @@ TorProtocolService.prototype =
aConn = this.mControlConnection;
if (aConn && aConn.socket)
- aConn.socket.close(0);
+ {
+ if (aConn.binInStream)
+ aConn.binInStream.close();
+ if (aConn.binOutStream)
+ aConn.binOutStream.close();
+
+ aConn.socket.close(Cr.NS_OK);
+ }
if (aConn == this.mControlConnection)
this.mControlConnection = null;
@@ -1142,8 +1149,11 @@ TorProtocolService.prototype =
{
onInputStreamReady: function(aInStream)
{
- if (_this.mEventMonitorConnection.inStream != aInStream)
+ if (!_this.mEventMonitorConnection ||
+ (_this.mEventMonitorConnection.inStream != aInStream))
+ {
return;
+ }
var binStream = _this.mEventMonitorConnection.binInStream;
var bytes = binStream.readBytes(binStream.available());
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits