mirror of
https://github.com/MercuryWorkshop/bare-mux.git
synced 2025-05-14 06:40:02 -04:00
throw an error instead of returning
This commit is contained in:
parent
66f0cc1ed0
commit
9f71bc0bfb
1 changed files with 1 additions and 1 deletions
|
@ -50,7 +50,7 @@ async function searchForPort(): Promise<MessagePort> {
|
|||
} catch(err) {
|
||||
if (err instanceof AggregateError) {
|
||||
console.error("bare-mux: failed to get a bare-mux SharedWorker MessagePort as all clients returned an invalid MessagePort.");
|
||||
return;
|
||||
throw new Error("All clients returned an invalid MessagePort.");
|
||||
}
|
||||
console.warn("bare-mux: failed to get a bare-mux SharedWorker MessagePort within 1s, retrying");
|
||||
return await searchForPort();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue