style: fix
This commit is contained in:
1 parent
8f465e376e
commit
f3ae6fa70f
3 files changed
+2
-7
No files matched your search
@@ -125,11 +125,6 @@ export class NTEventChannel extends EventEmitter {
|
||||
return new Promise<Awaited<ReturnType<EventType>>>(async (resolve, reject) => {
|
||||
const EventFunc = this.createEventFunction<EventType>(EventName);
|
||||
let complete = false;
|
||||
const Timeouter = setTimeout(() => {
|
||||
if (!complete) {
|
||||
reject(new Error('NTEvent EventName:' + EventName + ' timeout'));
|
||||
}
|
||||
}, timeout);
|
||||
const retData = await EventFunc!(...args);
|
||||
complete = true;
|
||||
resolve(retData);
|
||||
|
||||
Reference in new issue
Block a user