-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Open
Labels
to triageWaiting to be triaged by a member of the teamWaiting to be triaged by a member of the team
Description
Describe the bug
Hi,
at my company we are in the middle of switching from express to uWebSockets.
We use
- Nestjs
- Ultimate-Express
- socket.io with attachApp
- engine.use(sessionMiddleware) <- thats the problem... or maybe not? (express-session)
While everything works really good, there is one thing we get errors.
- Server starts deployment, after that clients can connect and everything works
- Server goes down, restarts, etc. the client browser stays open!!
- When Server is up again, the reconnecting begins (sessionMiddleware is called)
- Various errors are showing up:
- Ok so I first thought hmm my sessionMiddleware does some bad things
- But after some debugging, I could fix it quite easy in uServer -> handleUpgrade
- I had to cork the response write and upgrade
- I saved the header before entering the async callback
I'm sry that I cannot really give a code example for this problem.
But does this seems to be a bug or just a problem in my project?
Nice to know, I absolutely don't have any error or problems after changing these few lines.
(Re-)Connecting with engine.use and express-session middleware works like a charm.
Platform:
- OS: [e.g. Linux, Windows, Mac]
Thanks in advance!
Metadata
Metadata
Assignees
Labels
to triageWaiting to be triaged by a member of the teamWaiting to be triaged by a member of the team