mirror of
https://github.com/Doodle3D/Doodle3D-API
synced 2024-12-22 13:53:48 +01:00
added alive check in doodle3dapi
This commit is contained in:
parent
92fc33e2de
commit
65088708bd
@ -81,6 +81,7 @@ export default class extends EventDispatcher {
|
||||
|
||||
async _update () {
|
||||
while (this.autoUpdate) {
|
||||
if (this.alive) {
|
||||
try {
|
||||
this.state = await this.info.status();
|
||||
|
||||
@ -88,6 +89,9 @@ export default class extends EventDispatcher {
|
||||
} catch(error) {
|
||||
await this.checkAlive();
|
||||
}
|
||||
} else {
|
||||
await this.checkAlive();
|
||||
}
|
||||
|
||||
await sleep(this.updateInterval);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user