Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/wincloud_gateway/node_modules/tarn/lib/ drwxr-xr-x | |
| Viewing file: Select action/file-type: "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const TimeoutError_1 = require("./TimeoutError");
const utils_1 = require("./utils");
class PendingOperation {
constructor(timeoutMillis) {
this.timeoutMillis = timeoutMillis;
this.deferred = utils_1.defer();
this.possibleTimeoutCause = null;
this.promise = timeout(this.deferred.promise, timeoutMillis).catch(err => {
if (err instanceof TimeoutError_1.TimeoutError) {
if (this.possibleTimeoutCause) {
err = new TimeoutError_1.TimeoutError(this.possibleTimeoutCause.message);
}
else {
err = new TimeoutError_1.TimeoutError('operation timed out for an unknown reason');
}
}
return Promise.reject(err);
});
}
abort() {
this.reject(new Error('aborted'));
}
reject(err) {
this.deferred.reject(err);
}
resolve(value) {
this.deferred.resolve(value);
}
}
exports.PendingOperation = PendingOperation;
function timeout(promise, time) {
return new Promise((resolve, reject) => {
const timeoutHandle = setTimeout(() => reject(new TimeoutError_1.TimeoutError()), time);
promise
.then(result => {
clearTimeout(timeoutHandle);
resolve(result);
})
.catch(err => {
clearTimeout(timeoutHandle);
reject(err);
});
});
}
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0073 ]-- |