Commit 2089f899 authored by Kathleen Brade's avatar Kathleen Brade
Browse files

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.
parent 0dbee8e0
......@@ -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());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment