Fix broken connection detection
This commit is contained in:
parent
4bc854bf00
commit
0ccf124cf0
@ -463,7 +463,7 @@ Client.fromCookie = async function(secret, defaulthost='vista.northport.med.va.g
|
|||||||
console.log('Using saved secret and connection', secret);
|
console.log('Using saved secret and connection', secret);
|
||||||
var cid = localstate.cid;
|
var cid = localstate.cid;
|
||||||
var client = Client.fromID(cid, secret);
|
var client = Client.fromID(cid, secret);
|
||||||
if((await vista.call(cid, { method: 'XWB_IM_HERE', ttl: 30, id: Date.now() })).result == '1') {
|
if((await vista.call(cid, { method: 'XWB_IM_HERE', ttl: 0, stale: false, id: Date.now() })).result == '1') {
|
||||||
var server = await client.serverinfo();
|
var server = await client.serverinfo();
|
||||||
if((host[0] == server.result.host) && (host[1] == server.result.port)) {
|
if((host[0] == server.result.host) && (host[1] == server.result.port)) {
|
||||||
localstate.host = host.join(':');
|
localstate.host = host.join(':');
|
||||||
|
Loading…
Reference in New Issue
Block a user