If theres an error remove the sync listener

This commit is contained in:
Robert Long 2021-11-17 16:39:59 -08:00
parent 99374bbe00
commit 3df1f89f06

View file

@ -25,6 +25,7 @@ function waitForSync(client) {
client.removeListener("sync", onSync);
} else if (state === "ERROR") {
reject(data?.error);
client.removeListener("sync", onSync);
}
};
client.on("sync", onSync);