Skip to content

[FEATURE REQUEST] Accept connected sockets from custom socket factory #1382

@shubha-rajan

Description

@shubha-rajan

Is your feature request related to a problem? If so, please give a short summary of the problem and how the feature would resolve it

Currently, when using a custom socket factory that returns a connected socket, a SocketException is thrown because the getConnectedSocket method in IOBuffer.java will attempt to connect without checking whether the socket is already connected.

Describe the preferred solution

Check whether a socket is connected before attempting to connect to it in getConnectedSocket. See the corresponding code in the Postgres JDBC driver for reference

Additional context

This small change would allow for compatibility with the Cloud SQL JDBC Socket Factory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementAn enhancement to the driver. Lower priority than bugs.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions