You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bugThe issue describes a bug in the codemergedA fix has been merged to mainverifyThe issue is considered fixed/done, and reassigned to the originator to verify.
Describe the bug
In the org.newsclub.net.mysql.AFUNIXDatabaseSocketFactoryCJ#connect method, the timeout parameter is not set when using the AFUNIXSocket#connectTo method. The default timeout is 0. If there are some abnormalities in the socket, the connectTo operation may be permanently blocked.
public <T extends Closeable> T connect(String hostname, int portNumber, PropertySet props, int loginTimeout) throws IOException {
..........
this.rawSocket = AFUNIXSocket.connectTo(new AFUNIXSocketAddress(socketFile));
...........
}
Expected behavior
Set the timeout correctly to prevent permanent blockage.
The text was updated successfully, but these errors were encountered:
AFUNIXDatabaseSocketFactoryCJ.connect takes a "loginTimeout" parameter,
and the system properties may specify a "connectTimeout".
While connecting to AF_UNIX sockets appears to not block in the regular
case, let's assume there's a corner case where respecting these values
makes sense.
Follow standard Mysql connector behavior and use these two timeouts to
determine the connect timeout for our unix domain sockets.
#154
kohlschuetter
added
bug
The issue describes a bug in the code
verify
The issue is considered fixed/done, and reassigned to the originator to verify.
merged
A fix has been merged to main
labels
Mar 7, 2024
kohlschuetter
changed the title
Improperly set timeout may result in permanent blockage
MySQL socket factory: Respect timeouts to prevent indefinite blocking
Mar 7, 2024
bugThe issue describes a bug in the codemergedA fix has been merged to mainverifyThe issue is considered fixed/done, and reassigned to the originator to verify.
Describe the bug
In the org.newsclub.net.mysql.AFUNIXDatabaseSocketFactoryCJ#connect method, the timeout parameter is not set when using the AFUNIXSocket#connectTo method. The default timeout is 0. If there are some abnormalities in the socket, the connectTo operation may be permanently blocked.
Expected behavior
Set the timeout correctly to prevent permanent blockage.
The text was updated successfully, but these errors were encountered: