Skip to content
Snippets Groups Projects
Commit 2d447e91 authored by Moritz Langenstein's avatar Moritz Langenstein
Browse files

(ml5717) Updated socket.io version

parent 5da4e707
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
"dependencies": { "dependencies": {
"farmhash": "^2.1.0", "farmhash": "^2.1.0",
"getconfig": "^4.3.0", "getconfig": "^4.3.0",
"node-uuid": "1.2.0", "uuid": "^3.3.3",
"socket.io": "^1.7.4", "socket.io": "^2.3.0",
"socket.io-redis": "4.0.1", "socket.io-redis": "5.2.0",
"sticky-session": "^1.1.2" "sticky-session": "^1.1.2"
}, },
"main": "dist/server.js", "main": "dist/server.js",
......
import socketIO from 'socket.io'; import socketIO from 'socket.io';
import uuid from 'node-uuid'; import uuidv4 from 'uuid/v4';
import crypto from 'crypto'; import crypto from 'crypto';
import redisAdapter from 'socket.io-redis'; import redisAdapter from 'socket.io-redis';
import { safeCb } from './util'; import { safeCb } from './util';
...@@ -96,10 +96,10 @@ export default (server, config) => { ...@@ -96,10 +96,10 @@ export default (server, config) => {
client.on('create', (name, cb) => { client.on('create', (name, cb) => {
if (arguments.length === 2) { if (arguments.length === 2) {
cb = (typeof cb === 'function') ? cb : () => {}; cb = (typeof cb === 'function') ? cb : () => {};
name = name || uuid(); name = name || uuidv4();
} else { } else {
cb = name; cb = name;
name = uuid(); name = uuidv4();
} }
// check if exists // check if exists
io.in(name).clients((err, clients) => { io.in(name).clients((err, clients) => {
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment