branch-2.1: [fix](broker) fix fd always timeout #48494 (#48522)

Cherry-picked from #48494

Co-authored-by: Lijia Liu <liutang123@yeah.net>
Co-authored-by: liutang123 <liulijia@gmail.com>
Co-authored-by: Dongyang Li <lidongyang@selectdb.com>
This commit is contained in:
github-actions[bot]
2025-03-03 18:15:10 +08:00
committed by GitHub
parent 1668d9ddc6
commit 9cf3b4671d

View File

@ -145,11 +145,11 @@ public class ClientContextManager {
fd = entry.getKey();
if (entry.getValue().checkExpire(inputStreamExpireSeconds)) {
ClientContextManager.this.removeInputStream(fd);
iter.remove();
logger.info(fd + " in client [" + clientContext.clientId
+ "] is expired, remove it from contexts. last update time is "
+ entry.getValue().getLastPingTimestamp());
}
iter.remove();
logger.info(fd + " in client [" + clientContext.clientId
+ "] is expired, remove it from contexts. last update time is "
+ entry.getValue().getLastPingTimestamp());
}
}
}
@ -167,7 +167,7 @@ public class ClientContextManager {
ClientContextManager.this.removeOutputStream(fd);
}
clientContexts.remove(clientContext.clientId);
logger.info("client [" + clientContext.clientId
logger.info("client [" + clientContext.clientId
+ "] is expired, remove it from contexts. last access time is "
+ clientContext.lastAccessTimestamp);
}