diff --git a/src/main/java/com/actiontech/dble/net/IOProcessor.java b/src/main/java/com/actiontech/dble/net/IOProcessor.java index 102ef9a5b2..14ac32a98f 100644 --- a/src/main/java/com/actiontech/dble/net/IOProcessor.java +++ b/src/main/java/com/actiontech/dble/net/IOProcessor.java @@ -189,10 +189,10 @@ private void backendCheck() { } long cost = System.currentTimeMillis() - c.getStartupTime(); - // a connection in change user if (c.getService() instanceof MySQLBackAuthService) { //when the connection creation time is greater than the connectionTimeout, it is a network timeout - if (cost >= c.getConnectionTimeout()) { + //except for the scenario of changing user,see it:com.actiontech.dble.services.mysqlsharding.MySQLResponseService.changeUser + if (c.getState() != PooledConnection.STATE_IN_USE && cost >= c.getConnectionTimeout()) { c.close("Create connection timed out"); } continue;