RFR: 7903730: Enhance the agentvm to be tolerant to unexpected connection on the port the Agent listens on for handshake with the AgentServer [v3]
Ludvig Janiuk
lujaniuk at openjdk.org
Tue May 21 08:19:16 UTC 2024
On Tue, 21 May 2024 01:55:31 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
>> Use `Throwable.addSuppressed` -- it is for exactly this situation.
>
>> Use Throwable.addSuppressed -- it is for exactly this situation.
>
> But we wouldn't be throwing any exception to which we would be adding this as a suppressed exception. This failure is during close()ing a connection on which we either had a read timeout or an IOException when reading off it. We log that failure a few lines above this and then go and close this connection and then attempt to accept() a next connection (if any).
>
> I can update this catch block to log a message which states the close() failed, along with the reason. Is that reasonable?
> if any errors result during that close, we don't want to propagate it
I understand that we want to drop the rogue connection, but if closing fails, I do want to propagate that exception. The exception from close() could be something we didn't expect and I want to be able to troubleshoot it if it should happen.
-------------
PR Review Comment: https://git.openjdk.org/jtreg/pull/195#discussion_r1607859678
More information about the jtreg-dev
mailing list