Skip to content

Commit 70253dd

Browse files
committed
Catch auth errors and reject
1 parent 34ea6f0 commit 70253dd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/backend.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,11 @@ function Backend({
149149

150150
function Authentication(x) {
151151
const type = x.readInt32BE(5)
152-
type !== 0 && onauth(type, x)
152+
try {
153+
type !== 0 && onauth(type, x)
154+
} catch (err) {
155+
reject(err)
156+
}
153157
}
154158

155159
function ParameterStatus(x) {

0 commit comments

Comments
 (0)