RFR: 8269481: SctpMultiChannel never releases own file descriptor [v2]
Brian Burkhalter
bpb at openjdk.java.net
Tue Jun 29 16:10:48 UTC 2021
On Tue, 29 Jun 2021 06:52:47 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8269481: Set state to KILLED *before* closing socket
>
> src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpChannelImpl.java line 643:
>
>> 641: if (state == ChannelState.UNINITIALIZED) {
>> 642: SctpNet.close(fdVal);
>> 643: state = ChannelState.KILLED;
>
> It might be better to invert these, meaning set the state to KILLED before close(fdVal), just in case the close throws.
So modified.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4621
More information about the net-dev
mailing list