1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-18 17:23:16 +00:00

Updated coreinfo test

This commit is contained in:
Bryan Roe
2021-02-09 23:56:41 -08:00
parent 3d63758b12
commit 2b191470e8

View File

@@ -224,7 +224,6 @@ function start()
if (debugmode) if (debugmode)
{ {
console.log('\n' + 'ipcPath = ' + ipcPath + '\n'); console.log('\n' + 'ipcPath = ' + ipcPath + '\n');
require('ChainViewer').getSnapshot().then(function (c) { console.log(c); });
} }
if (ipcPath != null) if (ipcPath != null)
@@ -400,8 +399,12 @@ function coreInfo()
ret.tester = this; ret.tester = this;
ret.handler = function handler(J) ret.handler = function handler(J)
{ {
if (debugmode) { console.log(JSON.stringify(J)); }
switch(J.action) switch(J.action)
{ {
case 'sessions':
ret._sessions = true;
break;
case 'coreinfo': case 'coreinfo':
if (!handler.coreinfo) if (!handler.coreinfo)
{ {
@@ -473,8 +476,14 @@ function coreInfo()
{ {
if(!r.handler.coreinfo) if(!r.handler.coreinfo)
{ {
if (r._sessions)
{
console.log(' -> Core Info received...............[OK]')
r._res();
return;
}
// Core Info was never recevied // Core Info was never recevied
r._rej(' -> Core Info received..............[FAILED]') r._rej(' -> Core Info received...............[FAILED]')
} }
else if(r.handler.amt) else if(r.handler.amt)
{ {