-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Entries of closed connections in connections map of org.springframework.integration.ip.tcp.TcpSendingMessageHandler are not removed by removeDeadConnection when closed by client side.
Spring integ is listening on port on windows server 2019 standard.
I added some debug prints inside TcpSendingMessageHandler in addNewConnection and removeDead connections see attached log.
some explanation about the log.
I added to
public void addNewConnection(TcpConnection connection) {
this.connections.put(connection.getConnectionId(), connection);
**System.out.println(System.currentTimeMillis() + "," + LocalDateTime.now() + ",add," + connection.getConnectionId() + "," + this.connections.size() + "," +
this.hashCode());
logger.debug(System.currentTimeMillis() + "," + LocalDateTime.now() + ",add," + connection.getConnectionId() + "," + this.connections.size() + "," +
this.hashCode());**
}
That produces:
1640555438506,2021-12-26T23:50:38.506633400,add,10.64.34.156:64269:7006:9bbe89c3-b523-437c-bf3d-6c100d13e5fb,951,1463333127
And I added to:
public void removeDeadConnection(TcpConnection connection) {
this.connections.remove(connection.getConnectionId());
**System.out.println(System.currentTimeMillis() + "," + LocalDateTime.now() + ",remove," + connection.getConnectionId() + "," + this.connections.size() + "," +
this.hashCode());
logger.debug(System.currentTimeMillis() + "," + LocalDateTime.now() + ",remove," + connection.getConnectionId() + "," + this.connections.size() + "," +
this.hashCode());**
}
That produces:
1640556010630,2021-12-27T00:00:10.630973200,remove,10.64.34.156:64868:7006:77667a14-440c-4629-b698-d5f0b2a25e6b,984,1463333127
The problem manifested when host 10.64.34.156 connects to spring integration listener on port 7006.
I can not understand why, but it stopped removing inactive connections from connections map.
A link
agjstd_13600-2021-12-26.1.log
10x in advance, if you need further details please do not hasitate to contact me.