@@ -28,7 +28,7 @@ public ConsulConfigurationClient(IConsulClientFactory consulClientFactory, ICons
2828
2929 public async Task < IConfigQueryResult > GetConfig ( )
3030 {
31- var result = await GetKVPair ( ) ;
31+ var result = await GetKVPair ( ) . ConfigureAwait ( false ) ;
3232 UpdateLastIndex ( result ) ;
3333 return new ConfigQueryResult ( result ) ;
3434 }
@@ -43,7 +43,8 @@ private async Task<QueryResult<KVPair>> GetKVPair(QueryOptions queryOptions = nu
4343 {
4444 using ( IConsulClient consulClient = _consulClientFactory . Create ( ) )
4545 {
46- QueryResult < KVPair > result = await consulClient . KV . Get ( _source . Key , queryOptions , _source . CancellationToken ) ;
46+ QueryResult < KVPair > result = await consulClient . KV . Get ( _source . Key , queryOptions , _source . CancellationToken )
47+ . ConfigureAwait ( false ) ;
4748 switch ( result . StatusCode )
4849 {
4950 case HttpStatusCode . OK :
@@ -61,7 +62,7 @@ private async Task PollForChanges(Action<ConsulWatchExceptionContext> onExceptio
6162 {
6263 try
6364 {
64- if ( await HasValueChanged ( ) )
65+ if ( await HasValueChanged ( ) . ConfigureAwait ( false ) )
6566 {
6667 var previousToken = Interlocked . Exchange ( ref _reloadToken , new ConfigurationReloadToken ( ) ) ;
6768 previousToken . OnReload ( ) ;
@@ -84,7 +85,7 @@ private async Task<bool> HasValueChanged()
8485 queryOptions = new QueryOptions { WaitIndex = _lastIndex } ;
8586 }
8687
87- var result = await GetKVPair ( queryOptions ) ;
88+ var result = await GetKVPair ( queryOptions ) . ConfigureAwait ( false ) ;
8889 return result != null && UpdateLastIndex ( result ) ;
8990 }
9091
0 commit comments