[crac] RFR: Handle open file descriptors with configurable policies [v9]

Radim Vansa rvansa at openjdk.org
Tue Jul 4 07:59:31 UTC 2023


On Mon, 3 Jul 2023 17:11:34 GMT, Anton Kozlov <akozlov at openjdk.org> wrote:

>> Radim Vansa has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Cosmetic fixes (imports)
>
> src/java.base/share/classes/jdk/internal/crac/JDKSocketResourceBase.java line 138:
> 
>> 136:     public void afterRestore(Context<? extends Resource> context) throws Exception {
>> 137:         // Don't do anything when we've already failed
>> 138:         if (originalFd < 0 || error) {
> 
> The orignalFd seems to be a leftover, it's not clear why is it stored as a part of the state. Should not we just consider `error`?

Functionally it's used to mark the socket as invalid, and I've kept the FD number for debugging, but I can remove that...

-------------

PR Review Comment: https://git.openjdk.org/crac/pull/69#discussion_r1251645028


More information about the crac-dev mailing list