Skip to content

Commit

Permalink
Small cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
astei committed Oct 12, 2024
1 parent ae12c47 commit 8971dbe
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ public enum TransportType {
final ChannelFactory<? extends SocketChannel> socketChannelFactory;
final ChannelFactory<? extends DatagramChannel> datagramChannelFactory;
final Supplier<IoHandlerFactory> ioHandlerFactorySupplier;
volatile IoHandlerFactory ioHandlerFactory;

TransportType(final String name,
final ChannelFactory<? extends ServerSocketChannel> serverSocketChannelFactory,
Expand All @@ -99,12 +98,8 @@ public String toString() {
* @return the event loop group
*/
public EventLoopGroup createEventLoopGroup(final Type type) {
if (this.ioHandlerFactory == null) {
this.ioHandlerFactory = this.ioHandlerFactorySupplier.get();
}
assert this.ioHandlerFactory != null;
return new MultiThreadIoEventLoopGroup(
0, createThreadFactory(this.name, type), this.ioHandlerFactory);
0, createThreadFactory(this.name, type), this.ioHandlerFactorySupplier.get());
}

private static ThreadFactory createThreadFactory(final String name, final Type type) {
Expand Down

0 comments on commit 8971dbe

Please sign in to comment.