@@ -1710,9 +1710,9 @@ class NodeConnectionManager {
17101710
17111711 // Write the forward authentication message from this node
17121712 await writer . write ( authenticateMessage ) ;
1713- const forwardMessageResultPair = await utils . resultOrAbort (
1713+ const forwardMessageResultPair = await utils . raceSignal (
17141714 reader . read ( ) ,
1715- ctx ,
1715+ ctx . signal ,
17161716 ) ;
17171717 if ( forwardMessageResultPair . done ) {
17181718 throw new nodesErrors . ErrorNodeAuthenticationInvalidProtocol (
@@ -1727,9 +1727,9 @@ class NodeConnectionManager {
17271727 }
17281728
17291729 // Read and process the authentication token sent by the connectee
1730- const reverseMessageInPair = await utils . resultOrAbort (
1730+ const reverseMessageInPair = await utils . raceSignal (
17311731 reader . read ( ) ,
1732- ctx ,
1732+ ctx . signal ,
17331733 ) ;
17341734 if ( reverseMessageInPair . done ) {
17351735 throw new nodesErrors . ErrorNodeAuthenticationInvalidProtocol (
@@ -1750,7 +1750,7 @@ class NodeConnectionManager {
17501750 await writer . write ( { type : 'success' , success : true } ) ;
17511751
17521752 // Wait for other node to set its state
1753- const ackPair = await utils . resultOrAbort ( reader . read ( ) , ctx ) ;
1753+ const ackPair = await utils . raceSignal ( reader . read ( ) , ctx . signal ) ;
17541754 if ( ackPair . done ) {
17551755 throw new nodesErrors . ErrorNodeAuthenticationInvalidProtocol (
17561756 'Stream ended prematurely' ,
@@ -1920,9 +1920,9 @@ class NodeConnectionManager {
19201920 if ( connectionEntry == null ) utils . never ( 'Connection should be defined' ) ;
19211921
19221922 try {
1923- const reverseMessageInPair = await utils . resultOrAbort (
1923+ const reverseMessageInPair = await utils . raceSignal (
19241924 inputIterator . next ( ) ,
1925- ctx ,
1925+ ctx . signal ,
19261926 ) ;
19271927 if ( reverseMessageInPair . done === true ) {
19281928 throw new nodesErrors . ErrorNodeAuthenticationInvalidProtocol (
@@ -1952,9 +1952,9 @@ class NodeConnectionManager {
19521952
19531953 // Generate and yield the forward token from this node
19541954 yield await this . authenticateNetworkForwardCallback ( ctx ) ;
1955- const forwardMessageResultPair = await utils . resultOrAbort (
1955+ const forwardMessageResultPair = await utils . raceSignal (
19561956 inputIterator . next ( ) ,
1957- ctx ,
1957+ ctx . signal ,
19581958 ) ;
19591959 if ( forwardMessageResultPair . done === true ) {
19601960 throw new nodesErrors . ErrorNodeAuthenticationInvalidProtocol (
0 commit comments