File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -1243,6 +1243,8 @@ class NodeConnectionManager {
12431243 } ) ;
12441244 } ,
12451245 ) ;
1246+ // Prevent promise rejection leak
1247+ void holePunchAttempt . catch ( ( ) => { } ) ;
12461248 this . activeHolePunchPs . set ( id , holePunchAttempt ) ;
12471249 }
12481250
@@ -1299,7 +1301,7 @@ class NodeConnectionManager {
12991301 this . keyRing . keyPair ,
13001302 data ,
13011303 ) ;
1302- const connProm = this . withConnF ( targetNodeId , async ( conn ) => {
1304+ const connectionSignalP = this . withConnF ( targetNodeId , async ( conn ) => {
13031305 const client = conn . getClient ( ) ;
13041306 await client . methods . nodesConnectionSignalFinal ( {
13051307 sourceNodeIdEncoded : nodesUtils . encodeNodeId ( sourceNodeId ) ,
@@ -1325,9 +1327,11 @@ class NodeConnectionManager {
13251327 } ,
13261328 )
13271329 . finally ( ( ) => {
1328- this . activeSignalFinalPs . delete ( connProm ) ;
1330+ this . activeSignalFinalPs . delete ( connectionSignalP ) ;
13291331 } ) ;
1330- this . activeSignalFinalPs . add ( connProm ) ;
1332+ // Preventing promise rejection leak.
1333+ connectionSignalP . catch ( ( ) => { } ) ;
1334+ this . activeSignalFinalPs . add ( connectionSignalP ) ;
13311335 return {
13321336 host,
13331337 port,
Original file line number Diff line number Diff line change @@ -323,7 +323,8 @@ function isConnectionError(e): boolean {
323323 e instanceof quicErrors . ErrorQUICConnectionPeer ||
324324 e instanceof quicErrors . ErrorQUICConnectionLocal ||
325325 e instanceof quicErrors . ErrorQUICConnectionNotRunning ||
326- e instanceof quicErrors . ErrorQUICConnectionStopping
326+ e instanceof quicErrors . ErrorQUICConnectionStopping ||
327+ e instanceof quicErrors . ErrorQUICConnectionIdleTimeout
327328 ) ;
328329}
329330
You can’t perform that action at this time.
0 commit comments