fix: heartbeat connection lacks the assignment of connectionTimeout

This commit is contained in:
guoaomen
2023-03-28 10:12:46 +08:00
parent a0857ffc60
commit 4f6c62d6f5
2 changed files with 2 additions and 1 deletions

View File

@@ -338,7 +338,7 @@ public abstract class AbstractConnection implements Connection {
if (buffer != null) {
recycle(buffer);
}
this.cleanup(null);
this.cleanup("it will not writeDirectly because connection has been closed.");
return;
}

View File

@@ -30,6 +30,7 @@ public class BackendConnection extends PooledConnection {
super(channel, socketWR);
this.instance = instance;
DbInstanceConfig config = instance.getConfig();
this.connectionTimeout = config.getPoolConfig().getConnectionTimeout();
this.host = config.getIp();
this.port = config.getPort();
this.lastTime = TimeUtil.currentTimeMillis();