While analyzing the code using a static analysis tool, I noticed that the async calls to eventSubConnectAsync and pubsubConnect in app.js are not properly handled.
if (comfyJS.useEventSub) {
eventSubConnectAsync(mainChannel, password);
} else {
pubsubConnect(mainChannel, password);
}
Both of these are async functions, but:
They are not awaited
They are not followed by .catch(...)
There's no surrounding try/catch
This can cause unhandled promise rejections.