Skip to content

Commit c349ba1

Browse files
check if signal was aborted
1 parent bdd32e3 commit c349ba1

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/connection.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1931,7 +1931,8 @@ class Connection extends EventEmitter {
19311931
});
19321932
}, (err) => {
19331933
this.clearConnectTimer();
1934-
if (err.name === 'AbortError') {
1934+
1935+
if (signal.aborted) {
19351936
// Ignore the AbortError for now, this is still handled by the connectTimer firing
19361937
return;
19371938
}
@@ -2089,7 +2090,8 @@ class Connection extends EventEmitter {
20892090
this.socketHandlingForSendPreLogin(socket);
20902091
})().catch((err) => {
20912092
this.clearConnectTimer();
2092-
if (err === signal.reason) {
2093+
2094+
if (signal.aborted) {
20932095
return;
20942096
}
20952097

0 commit comments

Comments
 (0)