mirror of https://github.com/node-red/node-red.git
Guard against undefined sessions in multiplayer
parent
1b5b3f7f88
commit
011b47a108
|
@ -23,6 +23,7 @@ module.exports = {
|
|||
if (existingSessionId) {
|
||||
connections.delete(opts.session)
|
||||
const session = sessions.get(existingSessionId)
|
||||
if (session) {
|
||||
session.active = false
|
||||
session.idleTimeout = setTimeout(() => {
|
||||
sessions.delete(existingSessionId)
|
||||
|
@ -32,6 +33,7 @@ module.exports = {
|
|||
data: { session: existingSessionId }
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
runtime.events.on('comms:message:multiplayer/connect', (opts) => {
|
||||
let session
|
||||
|
|
Loading…
Reference in New Issue