This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-resolver.git

commit ee8c2b00951105d24259c9de2179d3a69eb97c23
Author: Guillaume Nodet <[email protected]>
AuthorDate: Sun Jun 7 06:45:07 2026 +0000

    Fix IpcServer.expirationCheck() crash on negative sleep argument
    
    F-18: Clamp Thread.sleep() argument to minimum 1ms to prevent
    IllegalArgumentException when left goes negative while clients
    are still connected. Previously this silently killed the expiration
    thread, causing the server to never shut down.
---
 .../src/main/java/org/eclipse/aether/named/ipc/IpcServer.java           | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/maven-resolver-named-locks-ipc/src/main/java/org/eclipse/aether/named/ipc/IpcServer.java
 
b/maven-resolver-named-locks-ipc/src/main/java/org/eclipse/aether/named/ipc/IpcServer.java
index dcafa4cba..99e49a124 100644
--- 
a/maven-resolver-named-locks-ipc/src/main/java/org/eclipse/aether/named/ipc/IpcServer.java
+++ 
b/maven-resolver-named-locks-ipc/src/main/java/org/eclipse/aether/named/ipc/IpcServer.java
@@ -377,7 +377,7 @@ public class IpcServer {
                 break;
             } else {
                 try {
-                    Thread.sleep(TimeUnit.NANOSECONDS.toMillis(left));
+                    Thread.sleep(Math.max(1, 
TimeUnit.NANOSECONDS.toMillis(left)));
                 } catch (InterruptedException e) {
                     info("IpcServer expiration check interrupted, closing");
                     close();

Reply via email to