From 32a6d837395d8f13773a357a30983a97ce6dcc23 Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Fri, 18 Jan 2019 08:48:27 +0100 Subject: [PATCH] Issue #132 - ClientConnector abstraction. Added name to default executor and scheduler after review. Signed-off-by: Simone Bordet --- .../main/java/org/eclipse/jetty/io/ClientConnector.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/ClientConnector.java b/jetty-io/src/main/java/org/eclipse/jetty/io/ClientConnector.java index 5bb069124fb..540c6eeecda 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/ClientConnector.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/ClientConnector.java @@ -167,9 +167,13 @@ public class ClientConnector extends ContainerLifeCycle protected void doStart() throws Exception { if (executor == null) - setExecutor(new QueuedThreadPool()); + { + QueuedThreadPool clientThreads = new QueuedThreadPool(); + clientThreads.setName(String.format("client-pool@%x", hashCode())); + setExecutor(clientThreads); + } if (scheduler == null) - setScheduler(new ScheduledExecutorScheduler()); + setScheduler(new ScheduledExecutorScheduler(String.format("client-scheduler@%x", hashCode()), false)); if (byteBufferPool == null) setByteBufferPool(new MappedByteBufferPool()); if (sslContextFactory == null)