зеркало из https://github.com/mozilla/gecko-dev.git
bug 1324952 - don't asyncWait on the input stream if we've been stopped in test_be_conservative.js r=mcmanus
MozReview-Commit-ID: 3wkbicHLuUG --HG-- extra : rebase_source : 5d5aaf89640a62efab203f527dbced441144f677
This commit is contained in:
Родитель
af866b1d42
Коммит
906fda1f23
|
@ -81,18 +81,27 @@ class TLSServerSecurityObserver {
|
|||
this.input = input;
|
||||
this.output = output;
|
||||
this.callbacks = [];
|
||||
this.stopped = false;
|
||||
}
|
||||
|
||||
onHandshakeDone(socket, status) {
|
||||
do_print("TLS handshake done");
|
||||
do_print(`TLS version used: ${status.tlsVersionUsed}`);
|
||||
|
||||
if (this.stopped) {
|
||||
do_print("handshake done callback stopped - closing streams and bailing");
|
||||
this.input.close();
|
||||
this.output.close();
|
||||
return;
|
||||
}
|
||||
|
||||
let callback = new InputStreamCallback(this.output);
|
||||
this.callbacks.push(callback);
|
||||
this.input.asyncWait(callback, 0, 0, Services.tm.currentThread);
|
||||
}
|
||||
|
||||
stop() {
|
||||
this.stopped = true;
|
||||
this.callbacks.forEach((callback) => {
|
||||
callback.stop();
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче