Throbber
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user