GeezerVison is showing github.com — fix: prevent DGC init failure if IpMulticastAll cannot be set (#16104) · netty/netty@e14a3bd
File tree
Expand file treeCollapse file tree
Open diff view settings
transport-classes-epoll/src/main/java/io/netty/channel/epoll transport-classes-io_uring/src/main/java/io/netty/channel/uring
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: transport-classes-epoll/src/main/java/io/netty/channel/epoll/EpollDatagramChannel.java +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
19 | 19 | import io.netty.buffer.ByteBufAllocator; |
20 | 20 | import io.netty.buffer.Unpooled; |
21 | 21 | import io.netty.channel.AddressedEnvelope; |
| 22 | +import io.netty.channel.ChannelException; |
22 | 23 | import io.netty.channel.ChannelFuture; |
23 | 24 | import io.netty.channel.ChannelMetadata; |
24 | 25 | import io.netty.channel.ChannelOutboundBuffer; |
@@ -130,7 +131,7 @@ private EpollDatagramChannel(LinuxSocket fd, boolean active) { |
130 | 131 | // Configure IP_MULTICAST_ALL - disable by default to match the behaviour of NIO. |
131 | 132 | try { |
132 | 133 | fd.setIpMulticastAll(IP_MULTICAST_ALL); |
133 | | - } catch (IOException e) { |
| 134 | + } catch (IOException | ChannelException e) { |
134 | 135 | logger.debug("Failed to set IP_MULTICAST_ALL to {}", IP_MULTICAST_ALL, e); |
135 | 136 | } |
136 | 137 |
|
|
Collapse file
Copy file name to clipboardExpand all lines: transport-classes-io_uring/src/main/java/io/netty/channel/uring/IoUringDatagramChannel.java +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
17 | 17 |
|
18 | 18 | import io.netty.buffer.ByteBuf; |
19 | 19 | import io.netty.channel.AddressedEnvelope; |
| 20 | +import io.netty.channel.ChannelException; |
20 | 21 | import io.netty.channel.ChannelFuture; |
21 | 22 | import io.netty.channel.ChannelMetadata; |
22 | 23 | import io.netty.channel.ChannelOutboundBuffer; |
@@ -119,7 +120,7 @@ private IoUringDatagramChannel(LinuxSocket fd, boolean active) { |
119 | 120 | // Configure IP_MULTICAST_ALL - disable by default to match the behaviour of NIO. |
120 | 121 | try { |
121 | 122 | fd.setIpMulticastAll(IP_MULTICAST_ALL); |
122 | | - } catch (IOException e) { |
| 123 | + } catch (IOException | ChannelException e) { |
123 | 124 | logger.debug("Failed to set IP_MULTICAST_ALL to {}", IP_MULTICAST_ALL, e); |
124 | 125 | } |
125 | 126 |
|
|