mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-18 17:23:16 +00:00
Updated coreinfo test
This commit is contained in:
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user