mirror of
https://github.com/actiontech/dble.git
synced 2026-01-06 04:40:17 -06:00
fix npe when the frontend connection is closed, the statement is still send (#3470)
This commit is contained in:
@@ -24,6 +24,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -48,7 +49,8 @@ public class BaseSelectHandler extends BaseDMLHandler {
|
||||
|
||||
public BackendConnection initConnection() throws Exception {
|
||||
if (serverSession.closed()) {
|
||||
return null;
|
||||
LOGGER.warn(" FrontendConnection is closed without sending a statement, conn is " + serverSession.getShardingService().getConnection());
|
||||
throw new IOException("FrontendConnection is closed");
|
||||
}
|
||||
|
||||
BackendConnection exeConn = serverSession.getTarget(rrss);
|
||||
|
||||
Reference in New Issue
Block a user