This commit is contained in:
2023-05-01 19:32:23 -04:00
parent a5b041ae9a
commit 64135c6941
3 changed files with 63 additions and 3 deletions

View File

@@ -284,7 +284,7 @@ export function Client(cid, secret) {
this.secret = secret;
this.cid = cid;
this.status = reactive({ connected: true });
this.status = reactive({ connected: true, request: null });
this.close = function() {
console.log('CLOSE', cid);
@@ -298,7 +298,8 @@ export function Client(cid, secret) {
if(body.params) Array.prototype.push.apply(body.params, params);
else body.params = params;
}
var res = await vista.call(cid, body);
var res = await vista.call(cid, this.status.request = body);
this.status.request = null;
if((res.error) && (res.error.type == 'ConnectionResetError')) this.close();
res._request = body;
return res;