aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/background.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/scripts/background.js')
-rw-r--r--app/scripts/background.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/scripts/background.js b/app/scripts/background.js
index 6d9f4865d..0276124cc 100644
--- a/app/scripts/background.js
+++ b/app/scripts/background.js
@@ -76,7 +76,11 @@ function onRpcRequest(remotePort, payload){
zeroClient.sendAsync(payload, function onPayloadHandled(err, response){
if (err) throw err
// console.log('MetaMaskPlugin - RPC complete:', payload, '->', response)
- remotePort.postMessage(response)
+ try {
+ remotePort.postMessage(response)
+ } catch (_) {
+ // port disconnected
+ }
})
}