From 5e55a5414a58fbafeb53ac869190515bb7be9e83 Mon Sep 17 00:00:00 2001 From: Eric Bowden Date: Mon, 4 May 2026 09:37:09 -0500 Subject: [PATCH] Added a missing "else" in AgentRunner.close() to match Java and avoid an NPE if an AgentRunner was created, never started, and then closed. --- src/Adaptive.Agrona/Concurrent/AgentRunner.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Adaptive.Agrona/Concurrent/AgentRunner.cs b/src/Adaptive.Agrona/Concurrent/AgentRunner.cs index 73533ad8..bc1e8127 100644 --- a/src/Adaptive.Agrona/Concurrent/AgentRunner.cs +++ b/src/Adaptive.Agrona/Concurrent/AgentRunner.cs @@ -191,7 +191,7 @@ public void Dispose() _errorHandler.OnError(ex); } } - if (TOMBSTONE != thread) + else if (TOMBSTONE != thread) { while (true) {