From dc86ddebb77fed06a2857ef7a6031a45724740a9 Mon Sep 17 00:00:00 2001 From: kumavis Date: Thu, 26 Jan 2017 16:07:35 -0800 Subject: [PATCH] background - graceful publicConfigStore connection teardown --- app/scripts/metamask-controller.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 347fa60dc..3e6ce0a2e 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -321,7 +321,9 @@ module.exports = class MetamaskController extends EventEmitter { setupPublicConfig (outStream) { pipe( this.publicConfigStore, - outStream + outStream, + // cleanup on disconnect + () => this.publicConfigStore.unpipe(outStream) ) }