Skip to content

Commit

Permalink
fix session access when already set but not yet open
Browse files Browse the repository at this point in the history
  • Loading branch information
lajosbencz committed Feb 7, 2020
1 parent 745b0de commit 6fa2a6e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ class Connection extends autobahn.Connection {
setTimeout(() => this.open());
return this._wampSessionDefer.promise;
}
if(!this._session.isOpen) {
return this._wampSessionDefer.promise;
}
return When.Promise.resolve(this._session);
}

Expand Down

0 comments on commit 6fa2a6e

Please sign in to comment.