Skip to content

Commit ba6ec03

Browse files
committed
Remove redundant try/catch block
1 parent be85dc1 commit ba6ec03

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/SeqCli/Cli/Commands/Node/HealthCommand.cs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
using SeqCli.Cli.Features;
2323
using SeqCli.Config;
2424
using SeqCli.Connection;
25-
using SeqCli.Util;
2625
using Serilog;
2726

2827
namespace SeqCli.Cli.Commands.Node;
@@ -77,16 +76,9 @@ async Task<int> RunUntilHealthy(SeqConnection connection, TimeSpan timeout)
7776
{
7877
while (true)
7978
{
80-
try
79+
if (await RunOnce(connection) == 0)
8180
{
82-
if (await RunOnce(connection) == 0)
83-
{
84-
return 0;
85-
}
86-
}
87-
catch (Exception ex)
88-
{
89-
Log.Error("{UnhandledExceptionMessage}", Presentation.FormattedMessage(ex));
81+
return 0;
9082
}
9183

9284
await Task.Delay(tick, ct.Token);

0 commit comments

Comments
 (0)