コード例 #1
0
		private static async Task PingAsync(IRequestPipeline pipeline, Node node, CancellationToken cancellationToken)
		{
			try
			{
				await pipeline.PingAsync(node, cancellationToken).ConfigureAwait(false);
			}
			catch (PipelineException e) when (e.Recoverable)
			{
				await pipeline.SniffOnConnectionFailureAsync(cancellationToken).ConfigureAwait(false);
				throw;
			}
		}
コード例 #2
0
ファイル: Transport.cs プロジェクト: lukapor/NEST
        private static async Task PingAsync(IRequestPipeline pipeline, Node node, List <PipelineException> seenExceptions)
        {
            try
            {
                await pipeline.PingAsync(node);
            }
            catch (PipelineException e) when(e.Recoverable)
            {
                await pipeline.SniffOnConnectionFailureAsync();

                e.RethrowKeepingStackTrace();
            }
        }
コード例 #3
0
 private async Task PingAsync(IRequestPipeline pipeline, Node node, CancellationToken cancellationToken)
 {
     try
     {
         await pipeline.PingAsync(node, cancellationToken).ConfigureAwait(false);
     }
     catch (PipelineException e) when(e.Recoverable)
     {
         if (_productRegistration.SupportsSniff)
         {
             await pipeline.SniffOnConnectionFailureAsync(cancellationToken).ConfigureAwait(false);
         }
         throw;
     }
 }