|
2 | 2 | cleanContextForImports()
|
3 | 3 | require('web3/dist/web3.min.js')
|
4 | 4 | const LocalMessageDuplexStream = require('post-message-stream')
|
5 |
| -const PingStream = require('ping-pong-stream/ping') |
6 |
| -const endOfStream = require('end-of-stream') |
| 5 | +// const PingStream = require('ping-pong-stream/ping') |
| 6 | +// const endOfStream = require('end-of-stream') |
7 | 7 | const setupDappAutoReload = require('./lib/auto-reload.js')
|
8 | 8 | const MetamaskInpageProvider = require('./lib/inpage-provider.js')
|
9 | 9 | restoreContextAfterImports()
|
@@ -40,13 +40,14 @@ reloadStream.once('data', triggerReload)
|
40 | 40 |
|
41 | 41 | // setup ping timeout autoreload
|
42 | 42 | // LocalMessageDuplexStream does not self-close, so reload if pingStream fails
|
43 |
| -var pingChannel = inpageProvider.multiStream.createStream('pingpong') |
44 |
| -var pingStream = new PingStream({ objectMode: true }) |
| 43 | +// var pingChannel = inpageProvider.multiStream.createStream('pingpong') |
| 44 | +// var pingStream = new PingStream({ objectMode: true }) |
45 | 45 | // wait for first successful reponse
|
46 |
| -metamaskStream.once('data', function(){ |
47 |
| - pingStream.pipe(pingChannel).pipe(pingStream) |
48 |
| -}) |
49 |
| -endOfStream(pingStream, triggerReload) |
| 46 | +// disable pingStream until https://github.com/MetaMask/metamask-plugin/issues/746 is resolved more gracefully |
| 47 | +// metamaskStream.once('data', function(){ |
| 48 | +// pingStream.pipe(pingChannel).pipe(pingStream) |
| 49 | +// }) |
| 50 | +// endOfStream(pingStream, triggerReload) |
50 | 51 |
|
51 | 52 | // set web3 defaultAcount
|
52 | 53 | inpageProvider.publicConfigStore.subscribe(function (state) {
|
|
0 commit comments