mirror of
https://github.com/gamedig/node-gamedig.git
synced 2024-11-16 00:38:31 +01:00
feat: use another optional chaining
This commit is contained in:
parent
b1b41d6e24
commit
b5c22141db
1 changed files with 1 additions and 1 deletions
|
@ -239,7 +239,7 @@ export default class Core extends EventEmitter {
|
||||||
timeout = Promises.createTimeout(this.options.socketTimeout, 'TCP')
|
timeout = Promises.createTimeout(this.options.socketTimeout, 'TCP')
|
||||||
return await Promise.race([promise, timeout, this.abortedPromise])
|
return await Promise.race([promise, timeout, this.abortedPromise])
|
||||||
} finally {
|
} finally {
|
||||||
timeout && timeout.cancel()
|
timeout?.cancel()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue