aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/obj-multiplex.js
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2016-10-13 03:35:55 +0800
committerkumavis <aaron@kumavis.me>2016-10-13 03:35:55 +0800
commita1c3c944cf534fff8bfb9560347a03ba2a2bda00 (patch)
tree29888693645c9ad04f4b703f1fb0c0dfdac0da60 /app/scripts/lib/obj-multiplex.js
parent0182f8a4e91b8a9b0951967d2c075955bfb4f24f (diff)
downloadtangerine-wallet-browser-a1c3c944cf534fff8bfb9560347a03ba2a2bda00.tar
tangerine-wallet-browser-a1c3c944cf534fff8bfb9560347a03ba2a2bda00.tar.gz
tangerine-wallet-browser-a1c3c944cf534fff8bfb9560347a03ba2a2bda00.tar.bz2
tangerine-wallet-browser-a1c3c944cf534fff8bfb9560347a03ba2a2bda00.tar.lz
tangerine-wallet-browser-a1c3c944cf534fff8bfb9560347a03ba2a2bda00.tar.xz
tangerine-wallet-browser-a1c3c944cf534fff8bfb9560347a03ba2a2bda00.tar.zst
tangerine-wallet-browser-a1c3c944cf534fff8bfb9560347a03ba2a2bda00.zip
dapp reload - fixed disconnect detection via polling
Diffstat (limited to 'app/scripts/lib/obj-multiplex.js')
-rw-r--r--app/scripts/lib/obj-multiplex.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/scripts/lib/obj-multiplex.js b/app/scripts/lib/obj-multiplex.js
index f54ff7653..bd114c394 100644
--- a/app/scripts/lib/obj-multiplex.js
+++ b/app/scripts/lib/obj-multiplex.js
@@ -10,9 +10,9 @@ function ObjectMultiplex (opts) {
var data = chunk.data
var substream = mx.streams[name]
if (!substream) {
- console.warn('orphaned data for stream ' + name)
+ console.warn(`orphaned data for stream "${name}"`)
} else {
- substream.push(data)
+ if (substream.push) substream.push(data)
}
return cb()
})
@@ -36,5 +36,9 @@ function ObjectMultiplex (opts) {
}
return substream
}
+ // ignore streams (dont display orphaned data warning)
+ mx.ignoreStream = function (name) {
+ mx.streams[name] = true
+ }
return mx
}