зеркало из https://github.com/mozilla/gecko-dev.git
bug 1344584 - proactively close streams in test_be_conservative.js to prevent leaks r=mcmanus
MozReview-Commit-ID: 89h5lQJum6c --HG-- extra : rebase_source : 50744f0c8bd21001362fbab090c4b34fd5992784
This commit is contained in:
Родитель
b741a8e4f6
Коммит
255cd7aea4
|
@ -73,6 +73,7 @@ class InputStreamCallback {
|
|||
|
||||
stop() {
|
||||
this.stopped = true;
|
||||
this.output.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -89,9 +90,7 @@ class TLSServerSecurityObserver {
|
|||
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();
|
||||
do_print("handshake done callback stopped - bailing");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -102,6 +101,8 @@ class TLSServerSecurityObserver {
|
|||
|
||||
stop() {
|
||||
this.stopped = true;
|
||||
this.input.close();
|
||||
this.output.close();
|
||||
this.callbacks.forEach((callback) => {
|
||||
callback.stop();
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче