question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[FEATURE REQUEST] Accept connected sockets from custom socket factory

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
peterbaecommented, Aug 25, 2020

Hi @shubha-rajan, sorry for the delay. We were busy working on the RTW and HotFix for our driver, and I will create a PR for this issue soon.

0reactions
shubha-rajancommented, Sep 1, 2020

I’ve created PR #1420 that addresses this issue. I’ve attached a zip file that contains this change - could you test it out and let me know if it works as intended @shubha-rajan?

github-1382.zip

Just tested it and it works!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Custom Socket Factories with Java RMI
This tutorial shows you steps to follow to implement and use custom socket factories with Java Remote Method Invocation (Java RMI). Custom socket...
Read more >
SSL/TLS connection from android to a Custom Socket Server
The default socket IS the secure socket, at least with any sane TCP/HTTP library. You have to make code changes to tell the...
Read more >
[Feature Request] get RealConnection rawsocket localport · Issue ...
If you're looking for a workaround, you can provide a custom SocketFactory that remembers the sockets returned. All reactions.
Read more >
Introducing Socket Broker - ExceptionFactory
SOCKS5 Proxy Connection. Connecting through a proxy server requires creating a SocketFactory and configuring the client to use the factory prior ...
Read more >
Sockets Examples - Mule 4 | MuleSoft Documentation
Run your Mule application and start a TCP client socket to send the expected query parameter by ... On the Connection tab, set...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found