Comparing version 0.9.10 to 0.9.11
@@ -62,2 +62,3 @@ // Copyright (c) 2015 Uber Technologies, Inc. | ||
CONST.DEFAULT_INACTIVITY_EXPIRY_TIMEOUT; | ||
this._bindSessionEvents(); | ||
} | ||
@@ -116,2 +117,15 @@ | ||
Session.prototype._bindSessionEvents = function() { | ||
this.once('expire', function() { | ||
debug('Session expired', {sessionToken: this.token}); | ||
this.expired = true; | ||
this.client = null; | ||
this.clientType = null; | ||
this._scopes = []; | ||
if (this._inactivityExpiryTimeout) { | ||
clearTimeout(this._inactivityExpiryTimeout); | ||
} | ||
}.bind(this)); | ||
}; | ||
Session.prototype._bindClientEvents = function() { | ||
@@ -214,8 +228,3 @@ this.client.on('scopeFetchMessage', this._onScopeFetchMessage.bind(this)); | ||
Session.prototype._inactivityExpiryTimeoutFired = function(message) { | ||
this.expired = true; | ||
this.client = null; | ||
this.clientType = null; | ||
this._scopes = []; | ||
this.emit('expire'); | ||
debug('Session expired', {sessionToken: this.token}); | ||
}; | ||
@@ -222,0 +231,0 @@ |
{ | ||
"name": "jetstream", | ||
"version": "0.9.10", | ||
"version": "0.9.11", | ||
"description": "Jetstream Sync server framework to sync local and remote models", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
506249
11331