mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-11-28 14:58:09 +09:00
fix: streamingテストおそい (#8912)
This commit is contained in:
parent
ba9ded3c96
commit
1831a6a339
File diff suppressed because it is too large
Load Diff
@ -186,7 +186,7 @@ export function connectStream(user: any, channel: string, listener: (message: Re
|
||||
});
|
||||
}
|
||||
|
||||
export const waitFire = async (user: any, channel: string, trgr: () => any, cond: (msg: Record<string, any>) => boolean) => {
|
||||
export const waitFire = async (user: any, channel: string, trgr: () => any, cond: (msg: Record<string, any>) => boolean, params?: any) => {
|
||||
return new Promise<boolean>(async (res, rej) => {
|
||||
let timer: NodeJS.Timeout;
|
||||
|
||||
@ -198,7 +198,7 @@ export const waitFire = async (user: any, channel: string, trgr: () => any, cond
|
||||
if (timer) clearTimeout(timer);
|
||||
res(true);
|
||||
}
|
||||
});
|
||||
}, params);
|
||||
} catch (e) {
|
||||
rej(e);
|
||||
}
|
||||
@ -208,7 +208,7 @@ export const waitFire = async (user: any, channel: string, trgr: () => any, cond
|
||||
timer = setTimeout(() => {
|
||||
ws.close();
|
||||
res(false);
|
||||
}, 5000);
|
||||
}, 3000);
|
||||
|
||||
try {
|
||||
await trgr();
|
||||
|
Loading…
Reference in New Issue
Block a user