diff --git a/src/main/java/io/asyncer/r2dbc/mysql/client/Client.java b/src/main/java/io/asyncer/r2dbc/mysql/client/Client.java index 08e2f8b7e..db19ff853 100644 --- a/src/main/java/io/asyncer/r2dbc/mysql/client/Client.java +++ b/src/main/java/io/asyncer/r2dbc/mysql/client/Client.java @@ -22,6 +22,8 @@ import io.asyncer.r2dbc.mysql.message.server.ServerMessage; import io.netty.buffer.ByteBufAllocator; import io.netty.channel.ChannelOption; +import io.netty.util.internal.logging.InternalLogger; +import io.netty.util.internal.logging.InternalLoggerFactory; import org.jetbrains.annotations.Nullable; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -39,6 +41,7 @@ * An abstraction that wraps the networking part of exchanging methods. */ public interface Client { + InternalLogger logger = InternalLoggerFactory.getInstance(Client.class); /** * Perform an exchange of a request message. Calling this method while a previous exchange is active will @@ -133,8 +136,7 @@ static Mono connect(MySqlSslConfiguration ssl, SocketAddress address, bo } if (socketTimeout != null) { - tcpClient = tcpClient.option(ChannelOption.SO_TIMEOUT, - Math.toIntExact(socketTimeout.toMillis())); + logger.warn("Socket timeout is not supported by the underlying connection and will be ignored."); } if (address instanceof InetSocketAddress) {