Skip to content

Bug: PgDriver.createConnectionFactory ignores NetClientOptions parameter #1608

@YunlongJ

Description

@YunlongJ

Version

5.0.7

Context

In io.vertx.pgclient.spi.PgDriver, the createConnectionFactory method implementation ignores the transportOptions argument. This means any NetClientOptions passed during pool creation or factory initialization are not applied to the underlying PgConnectionFactory.

Code Snippet

https://github.com/eclipse-vertx/vertx-sql-client/blob/master/vertx-pg-client/src/main/java/io/vertx/pgclient/spi/PgDriver.java

@Override
public ConnectionFactory<PgConnectOptions> createConnectionFactory(Vertx vertx, NetClientOptions transportOptions) {
  // transportOptions is ignored here!
  return new PgConnectionFactory((VertxInternal) vertx);
}

Steps to reproduce

  1. Create a PgPool with specific NetClientOptions (e.g., socks5 proxy).
  2. The PgDriver will instantiate PgConnectionFactory using only the Vertx instance.
  3. The custom NetClientOptions are discarded.

Do you have a reproducer?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions