We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug 4.2 -> 4.3 added this if statement check:
socket.io/lib/index.ts
Line 159 in 95810aa
To Reproduce Socket.IO server version: 4.3.0
4.3.0
Server
const { readFileSync } = require("fs"); const { createServer } = require("https"); const { Server } = require("socket.io"); const httpServer = createServer({ key: readFileSync("/path/to/my/key.pem"), cert: readFileSync("/path/to/my/cert.pem") }); const io = new Server(httpServer, { /* options */ }); io.on("connection", (socket) => { // ... }); httpServer.listen(3000);
^ From https://socket.io/docs/v4/server-initialization/#with-an-https-server
Expected behavior The https server should be attached. It isn't. You can see this by modifying the following in the /dist/index.js
/dist/index.js
console.log('look for this 1'); if (srv instanceof http.Server || typeof srv === "number") { console.log('look for this 2'); this.attach(srv); }
The text was updated successfully, but these errors were encountered:
This also breaks feathers/socketio. I cannot see why this check is necessary, I have created a PR that reverts it.
Sorry, something went wrong.
fix: fix server attachment (#4127)
0ef2a4d
The check excluded an HTTPS server from being properly attached. Related: #4124
fix: fix server attachment (socketio#4127)
85b630e
The check excluded an HTTPS server from being properly attached. Related: socketio#4124
Successfully merging a pull request may close this issue.
Describe the bug
4.2 -> 4.3 added this if statement check:
socket.io/lib/index.ts
Line 159 in 95810aa
That check means that servers made with the https module won't be bound:
To Reproduce
Socket.IO server version:
4.3.0
Server
^ From https://socket.io/docs/v4/server-initialization/#with-an-https-server
Expected behavior
The https server should be attached. It isn't. You can see this by modifying the following in the
/dist/index.js
The text was updated successfully, but these errors were encountered: