Driver version
11.2.1
Client Operating System
Linux
Problem description
When the database driver is used to connect to different SQLServer hosts, it can happen that the TCP connection is established to the wrong host. This is due to a race-condition in com.microsoft.sqlserver.jdbc.SocketFinder#getSocketByIPPreference. The change was introduced in #1766.
com.microsoft.sqlserver.jdbc.SocketFinder#addressList is static, and this state is shared across all SQLServerConnection instances, even if connected to different SQLServer hosts. A race-condition when mutating this state in com.microsoft.sqlserver.jdbc.SocketFinder#getSocketByIPPreference can lead to the socked being connected to an unexpected host.
Driver version
11.2.1
Client Operating System
Linux
Problem description
When the database driver is used to connect to different SQLServer hosts, it can happen that the TCP connection is established to the wrong host. This is due to a race-condition in
com.microsoft.sqlserver.jdbc.SocketFinder#getSocketByIPPreference. The change was introduced in #1766.com.microsoft.sqlserver.jdbc.SocketFinder#addressList is
static, and this state is shared across allSQLServerConnectioninstances, even if connected to different SQLServer hosts. A race-condition when mutating this state incom.microsoft.sqlserver.jdbc.SocketFinder#getSocketByIPPreferencecan lead to the socked being connected to an unexpected host.