fix bind address exception

Motivation:

if you run a io_uring example two times in a row, you gonna get bind address exception

Modification:
-set SO_REUSEADDR as default

Result:
fixed bug
This commit is contained in:
Josef Grieb 2020-07-28 21:19:46 +02:00
parent 97b4537ab1
commit df84759128

View File

@ -21,5 +21,12 @@ public class IOUringServerSocketChannelConfig extends IOUringServerChannelConfig
IOUringServerSocketChannelConfig(AbstractIOUringServerChannel channel) { IOUringServerSocketChannelConfig(AbstractIOUringServerChannel channel) {
super(channel); super(channel);
setReuseAddress(true);
}
@Override
public IOUringServerSocketChannelConfig setReuseAddress(boolean reuseAddress) {
super.setReuseAddress(reuseAddress);
return this;
} }
} }