Wrap all websocket errors, reconnect earlier
This commit is contained in:
parent
8f5086227a
commit
584cedecff
3 changed files with 46 additions and 3 deletions
|
@ -336,9 +336,18 @@ async function _connectSocket(
|
|||
|
||||
reject(translatedError);
|
||||
});
|
||||
client.on('connectFailed', error => {
|
||||
client.on('connectFailed', e => {
|
||||
clearTimeout(timer);
|
||||
reject(error);
|
||||
|
||||
reject(
|
||||
makeHTTPError(
|
||||
'_connectSocket connectFailed',
|
||||
0,
|
||||
{},
|
||||
e.toString(),
|
||||
stack
|
||||
)
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue