@@ -51,8 +51,8 @@ exports.expressCreateServer = (hookName, args, cb) => {
51
51
// there shouldn't be a browser that isn't compatible to all
52
52
// transports in this list at once
53
53
// e.g. XHR is disabled in IE by default, so in IE it should use jsonp-polling
54
- io = socketio ( {
55
- transports : settings . socketTransportProtocols ,
54
+ io = new socketio . Server ( {
55
+ transports : settings . socketTransportProtocols
56
56
} ) . listen ( args . server , {
57
57
/*
58
58
* Do not set the "io" cookie.
@@ -106,14 +106,14 @@ exports.expressCreateServer = (hookName, args, cb) => {
106
106
} ) ;
107
107
108
108
io . use ( ( socket , next ) => {
109
- socket . conn . on ( 'packet ' , ( packet ) => {
109
+ socket . conn . on ( 'package ' , ( packet ) => {
110
110
// Tell express-session that the session is still active. The session store can use these
111
111
// touch events to defer automatic session cleanup, and if express-session is configured with
112
112
// rolling=true the cookie's expiration time will be renewed. (Note that WebSockets does not
113
113
// have a standard mechanism for periodically updating the browser's cookies, so the browser
114
114
// will not see the new cookie expiration time unless it makes a new HTTP request or the new
115
115
// cookie value is sent to the client in a custom socket.io message.)
116
- if ( socket . request . session != null ) socket . request . session . touch ( ) ;
116
+ if ( packet . request . session != null ) packet . request . session . touch ( ) ;
117
117
} ) ;
118
118
next ( ) ;
119
119
} ) ;
0 commit comments