Skip to content

Fix shutdown race condition#19

Merged
greg-at-moderne merged 1 commit into
mainfrom
greg-fix-jsonrpc-ci-failure
May 8, 2026
Merged

Fix shutdown race condition#19
greg-at-moderne merged 1 commit into
mainfrom
greg-fix-jsonrpc-ci-failure

Conversation

@greg-at-moderne
Copy link
Copy Markdown
Member

@greg-at-moderne greg-at-moderne commented May 8, 2026

What:
A follow-up to #16.
Fix a race in JsonRpc.send()/EOF handler where a request registered after the reader loop drained openRequests on peer EOF would hang until the caller’s timeout instead of failing with JsonRpcException.

Why:
Fix broken CI:

JsonRpcTest > readerLoopExitsCleanlyOnEof() FAILED
    java.lang.AssertionError: 
    Expecting a throwable with cause being an instance of:
      io.moderne.jsonrpc.JsonRpcException
    but current throwable has no cause.
    Throwable that failed the check:
    java.util.concurrent.TimeoutException

@greg-at-moderne greg-at-moderne self-assigned this May 8, 2026
@greg-at-moderne greg-at-moderne marked this pull request as ready for review May 8, 2026 06:19
@greg-at-moderne greg-at-moderne merged commit eeb84aa into main May 8, 2026
1 check passed
@greg-at-moderne greg-at-moderne deleted the greg-fix-jsonrpc-ci-failure branch May 8, 2026 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant