This doesn't work like you think it does. :-)

Put parentheses around `this.server.listeners('resumeSession').length > 0 || this.server.listeners('newSession').length > 0`