Skip to content

Commit

Permalink
Make Standard happy
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperisager committed Jun 12, 2024
1 parent f9c3552 commit 07aa6fe
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,8 @@ exports.Socket = class TLSSocket extends Duplex {
if (binding.handshake(this._handle)) this._onconnect()
else break
} catch (err) {
err = errors.from(err)
if (this._pendingOpen) this._pendingOpen(err)
else this.destroy(err)
if (this._pendingOpen) this._pendingOpen(errors.from(err))
else this.destroy(errors.from(err))
return
}
}
Expand Down

0 comments on commit 07aa6fe

Please sign in to comment.