File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -359,17 +359,16 @@ export class LitCore extends EventEmitter {
359359 message
360360 ) ;
361361
362- // Signal to any listeners that we've encountered a fatal error
363- this . emit (
364- 'error' ,
365- new Error (
366- 'Error while attempting to reconnect to nodes after epoch transition:' +
362+ const handshakeError = new Error (
363+ 'Error while attempting to reconnect to nodes after epoch transition:' +
367364 message
368- )
369365 ) ;
370366
367+ // Signal to any listeners that we've encountered a fatal error
368+ this . emit ( 'error' , handshakeError ) ;
369+
371370 // Signal to any listeners that we're 'disconnected' from LIT network
372- this . emit ( 'disconnected' , true ) ;
371+ this . emit ( 'disconnected' , { reason : 'error' , error : handshakeError } ) ;
373372 }
374373 }
375374
@@ -414,7 +413,7 @@ export class LitCore extends EventEmitter {
414413 this . _stopListeningForNewEpoch ( ) ;
415414 // this._stopNetworkPolling();
416415 setMiscLitConfig ( undefined ) ;
417- this . emit ( 'disconnected' , true ) ;
416+ this . emit ( 'disconnected' , { reason : 'disconnect' } ) ;
418417 }
419418
420419 // _stopNetworkPolling() {
You can’t perform that action at this time.
0 commit comments