Socket.io using Redis adapter complained on server.handleUpgrade() called more than once #4584
-
Hey server code:
index.js -
Client code:
this code working perfect on local, when we tried to deploy on azure we got an error: _Error: server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration any idea why ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi! I think that's because the HTTP server is attached twice: Here: const io = require('./shared/socket').init(httpServer); And here: io.attach(httpsServer); // I guess it's a typo and should be "httpServer" instead Could you please check? |
Beta Was this translation helpful? Give feedback.
Hi! I think that's because the HTTP server is attached twice:
Here:
And here:
Could you please check?