Move the code to native
This commit is contained in:
parent
d23d9dcf01
commit
ffed3e9c0c
2 changed files with 11 additions and 6 deletions
|
@ -14,15 +14,9 @@ Object.defineProperties(exports, {
|
|||
}
|
||||
})
|
||||
|
||||
const sessions = []
|
||||
|
||||
// Wraps native Session class.
|
||||
_setWrapSession(function (session) {
|
||||
// Session is an EventEmitter.
|
||||
Object.setPrototypeOf(session, EventEmitter.prototype)
|
||||
app.emit('session-created', session)
|
||||
|
||||
// The Sessions should never be garbage collected, since the common pattern is
|
||||
// to use partition strings, instead of using the Session object directly.
|
||||
sessions.push(session)
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue