INT-2168 Backport - Missing Port in Connection Id

Broken by INT-1822.
This commit is contained in:
Gary Russell
2011-10-05 17:49:22 -04:00
committed by Mark Fisher
parent 316f526472
commit e12ce5b933

View File

@@ -70,8 +70,6 @@ public abstract class AbstractTcpConnection implements TcpConnection {
private String hostAddress = "unknown";
private int port;
private final boolean lookupHost;
private int hashCode;
@@ -89,7 +87,8 @@ public abstract class AbstractTcpConnection implements TcpConnection {
this.hostName = this.hostAddress;
}
}
this.connectionId = this.hostName + ":" + this.port + ":" + this.hashCode;
int port = socket.getPort();
this.connectionId = this.hostName + ":" + port + ":" + this.hashCode;
try {
this.soLinger = socket.getSoLinger();
} catch (SocketException e) { }