我的旧socket.io
var ssl = {
key: fs.readFileSync(config.key),
cert: fs.readFileSync(config.cert),
};
var httpsServer = https.createServer(ssl).listen(2052);
var io = require('socket.io').listen(httpsServer, {log: true, pingTimeout: 20000});
我更新了 socket.io,但无法再连接了:
var ssl = {
key: fs.readFileSync(config.key),
cert: fs.readFileSync(config.cert),
};
var httpsServer = https.createServer(ssl).listen(2052);
var io = require('socket.io')(httpsServer);
io.listen(httpsServer, {log: true, pingTimeout: 20000});
我有错误:
Error: server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration