GeezerVison is showing github.com — fix: prevent DGC init failure if IpMulticastAll cannot be set (#16104… · netty/netty@cd0dc3d
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.ChannelConfig; |
| 22 | +import io.netty.channel.ChannelException; |
22 | 23 | import io.netty.channel.ChannelOption; |
23 | 24 | import io.netty.channel.ChannelOutboundBuffer; |
24 | 25 | import io.netty.channel.ChannelPipeline; |
@@ -118,7 +119,7 @@ private EpollDatagramChannel(EventLoop eventLoop, LinuxSocket fd, boolean active |
118 | 119 | // Configure IP_MULTICAST_ALL - disable by default to match the behaviour of NIO. |
119 | 120 | try { |
120 | 121 | fd.setIpMulticastAll(IP_MULTICAST_ALL); |
121 | | - } catch (IOException e) { |
| 122 | + } catch (IOException | ChannelException e) { |
122 | 123 | logger.debug("Failed to set IP_MULTICAST_ALL to {}", IP_MULTICAST_ALL, e); |
123 | 124 | } |
124 | 125 | } |
|
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.ChannelConfig; |
| 20 | +import io.netty.channel.ChannelException; |
20 | 21 | import io.netty.channel.ChannelOutboundBuffer; |
21 | 22 | import io.netty.channel.ChannelPipeline; |
22 | 23 | import io.netty.channel.ChannelShutdownType; |
@@ -117,7 +118,7 @@ private IoUringDatagramChannel(EventLoop eventLoop, LinuxSocket fd, boolean acti |
117 | 118 | // Configure IP_MULTICAST_ALL - disable by default to match the behaviour of NIO. |
118 | 119 | try { |
119 | 120 | fd.setIpMulticastAll(IP_MULTICAST_ALL); |
120 | | - } catch (IOException e) { |
| 121 | + } catch (IOException | ChannelException e) { |
121 | 122 | logger.debug("Failed to set IP_MULTICAST_ALL to {}", IP_MULTICAST_ALL, e); |
122 | 123 | } |
123 | 124 |
|
|