ChannelOption.IpMulticastTtl is ignored
- Dominant language
- C#
- Stars
- 4.3k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
When attempting to set the IpMulticastTtl channel option the provided value is ignored and instead the default value of 1 is retained.
```CSharp
var multicastHandler = new MulticastTestHandler();
var serverBootstrap = new Bootstrap();
serverBootstrap
.Group(serverGroup)
.ChannelFactory(() => new SocketDatagramChannel(addressFamily))
.Option(ChannelOption.IpMulticastTtl, 128)
.Handler(new ActionChannelInitializer(channel =>
{
channel.Pipeline.AddLast(nameof(SocketDatagramChannelMulticastTest), multicastHandler);
}));
```
Also, attempting to get the IpMulticastTtl channel option results in the following exception.
System.InvalidCastException: 'Unable to cast object of type 'System.Int32' to type 'System.Int16'.'
```CSharp
int multicast = serverChannel.Configuration.GetOption(ChannelOption.IpMulticastTtl);
```
IpMulticastTtl is declared as `ChannelOption` and possibly should be declared as `ChannelOption`?
Contributor guide
Assessment
This issue has not been assessed yet.