Skip to content

Commit b2745d9

Browse files
caoyawucaoyawu
andauthored
add 'ETIMEDOUT' to socketErrors so we can get error event when broker is unavailable (#1445)
Co-authored-by: caoyawu <ucs_caoyawu@caoyawu>
1 parent 55f6bc9 commit b2745d9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/client.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,11 @@ const socketErrors = [
3636
'ECONNREFUSED',
3737
'EADDRINUSE',
3838
'ECONNRESET',
39-
'ENOTFOUND'
39+
'ENOTFOUND',
40+
'ETIMEDOUT'
4041
]
4142

42-
// Other Socket Errors: EADDRINUSE, ECONNRESET, ENOTFOUND.
43+
// Other Socket Errors: EADDRINUSE, ECONNRESET, ENOTFOUND, ETIMEDOUT.
4344

4445
const errors = {
4546
0: '',

0 commit comments

Comments
 (0)