diff --git a/src/main/java/com/hivemq/client/internal/netty/NettyEventLoopProvider.java b/src/main/java/com/hivemq/client/internal/netty/NettyEventLoopProvider.java index 5ef5044c4..eb175d0d6 100644 --- a/src/main/java/com/hivemq/client/internal/netty/NettyEventLoopProvider.java +++ b/src/main/java/com/hivemq/client/internal/netty/NettyEventLoopProvider.java @@ -90,9 +90,10 @@ private NettyEventLoopProvider( if (entry == null) { final MultithreadEventLoopGroup eventLoopGroup; if (executor == null) { + final boolean useDaemonThreads = true; eventLoopGroup = eventLoopGroupFactory.apply( threadCount, new ThreadPerTaskExecutor( - new DefaultThreadFactory("com.hivemq.client.mqtt", Thread.MAX_PRIORITY))); + new DefaultThreadFactory("com.hivemq.client.mqtt", useDaemonThreads, Thread.MAX_PRIORITY))); } else if (executor instanceof MultithreadEventLoopGroup) { eventLoopGroup = (MultithreadEventLoopGroup) executor;