Closed yarnball closed 4 years ago
My code runs fine with async/await.
app.ws('/watcher/', async function (ws, req) {
await sleep(5000);
ws.on("message", (data) => {
...
});
});
Hmm, looks like this isn't the cause then. I'll close. Feel free to re-open if anyone see's a similar issue
Hi all,
I was recommended to use
express-ws
to better handle cookies with my websocket (even though it seems a little while since the last update).The below code works fine WITHOUT using the
AWAIT
When I add something async to await, my client is continually in the "connecting" phase.
Not sure if this is
express-ws
or the lib I'm using, but either way I'm open to any suggestions here?Is there somewhere else I could/should be doing this async call?
Same issue persists with this: