diff --git a/src/main/java/io/vertx/redis/client/impl/RedisConnectionManager.java b/src/main/java/io/vertx/redis/client/impl/RedisConnectionManager.java index f745d502..a95daa30 100644 --- a/src/main/java/io/vertx/redis/client/impl/RedisConnectionManager.java +++ b/src/main/java/io/vertx/redis/client/impl/RedisConnectionManager.java @@ -17,7 +17,6 @@ import io.vertx.core.*; import io.vertx.core.impl.ContextInternal; -import io.vertx.core.impl.EventLoopContext; import io.vertx.core.impl.VertxInternal; import io.vertx.core.impl.logging.Logger; import io.vertx.core.impl.logging.LoggerFactory; @@ -146,7 +145,7 @@ public boolean isValid(RedisConnectionInternal conn) { } @Override - public void connect(EventLoopContext ctx, Listener listener, Handler>> onConnect) { + public void connect(ContextInternal ctx, Listener listener, Handler>> onConnect) { // verify if we can make this connection final boolean netClientSsl = netClientOptions.isSsl(); final boolean connectionStringSsl = redisURI.ssl(); @@ -378,9 +377,9 @@ private void setup(ContextInternal ctx, RedisConnection connection, Request setu public Future getConnection(String connectionString, Request setup) { final Promise> promise = vertx.promise(); - final EventLoopContext eventLoopContext; - if (context instanceof EventLoopContext) { - eventLoopContext = (EventLoopContext) context; + final ContextInternal eventLoopContext; + if (context.isEventLoopContext()) { + eventLoopContext = context; } else { eventLoopContext = vertx.createEventLoopContext(context.nettyEventLoop(), context.workerPool(), context.classLoader()); }