Skip to content

Commit

Permalink
chore: remove _isOnCloseHandlerKey (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzlopak authored Aug 15, 2023
1 parent 3107f52 commit 4350184
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions boot.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function Boot (server, opts, done) {
this._current = []

this._error = null
this._isOnCloseHandlerKey = kIsOnCloseHandler

this._lastUsed = null

this.setMaxListeners(0)
Expand Down Expand Up @@ -284,7 +284,7 @@ Boot.prototype.onClose = function (func) {
throw new Error('not a function')
}

func[this._isOnCloseHandlerKey] = true
func[kIsOnCloseHandler] = true
this._closeQ.unshift(func, (err) => { err && (this._error = err) })

return this
Expand Down Expand Up @@ -501,7 +501,7 @@ function timeoutCall (func, rootErr, context, cb) {

function closeWithCbOrNextTick (func, cb) {
const context = this._server
const isOnCloseHandler = func[this._isOnCloseHandlerKey]
const isOnCloseHandler = func[kIsOnCloseHandler]
if (func.length === 0 || func.length === 1) {
let promise
if (isOnCloseHandler) {
Expand Down

0 comments on commit 4350184

Please sign in to comment.