File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -155,9 +155,7 @@ export class ConfigurationClientManager {
155155 // We need to make sure the scale of the potential memory leak is controllable.
156156 const srvQueryPromise = this . #querySrvTargetHost( host ) ;
157157 // There is no way to check the promise status synchronously, so we need to set the flag through the callback.
158- srvQueryPromise
159- . then ( ( ) => this . #srvQueryPending = false ) // resolved
160- . catch ( ( ) => this . #srvQueryPending = false ) ; // rejected
158+ srvQueryPromise . finally ( ( ) => this . #srvQueryPending = false )
161159 // If the srvQueryPromise is rejected before timeout, the error will be caught in the catch block.
162160 // Otherwise, the timeout error will be caught in the catch block and the srvQueryPromise rejection will be ignored.
163161 result = await Promise . race ( [
You can’t perform that action at this time.
0 commit comments