mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-23 04:41:54 +00:00
Bug 732553 - NS_BASE_STREAM_CLOSED in dbg-transport.js. r=past
This commit is contained in:
parent
96dbe26e10
commit
52dc995210
@ -92,7 +92,14 @@ DebuggerTransport.prototype = {
|
||||
|
||||
onOutputStreamReady:
|
||||
makeInfallible(function DT_onOutputStreamReady(aStream) {
|
||||
let written = aStream.write(this._outgoing, this._outgoing.length);
|
||||
let written = 0;
|
||||
try {
|
||||
written = aStream.write(this._outgoing, this._outgoing.length);
|
||||
} catch(e if e.result == Components.results.NS_BASE_STREAM_CLOSED) {
|
||||
dumpn("Connection closed.");
|
||||
this.close();
|
||||
return;
|
||||
}
|
||||
this._outgoing = this._outgoing.slice(written);
|
||||
this._flushOutgoing();
|
||||
}, "DebuggerTransport.prototype.onOutputStreamReady"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user