mirror of
https://github.com/actiontech/dble.git
synced 2026-05-20 14:49:14 -05:00
fix: service is set to null and connection close is not atomic (#2291)
service is set to null earlier than connection close
This commit is contained in:
@@ -213,13 +213,13 @@ public final class ShowBackend {
|
||||
row.add(c.getCharsetName().getClient().getBytes());
|
||||
row.add(c.getCharsetName().getCollation().getBytes());
|
||||
row.add(c.getCharsetName().getResults().getBytes());
|
||||
row.add(c.isClosed() ? null : (c.getBackendService().getTxIsolation() + "").getBytes());
|
||||
row.add(c.isClosed() ? null : (c.getBackendService().isAutocommit() + "").getBytes());
|
||||
row.add(c.isClosed() ? null : StringUtil.encode(c.getBackendService().getStringOfSysVariables(), charset));
|
||||
row.add(c.isClosed() ? null : StringUtil.encode(c.getBackendService().getStringOfUsrVariables(), charset));
|
||||
row.add(c.isClosed() ? null : StringUtil.encode(c.getBackendService().getXaStatus().toString(), charset));
|
||||
row.add(null == c.getBackendService() ? null : (c.getBackendService().getTxIsolation() + "").getBytes());
|
||||
row.add(null == c.getBackendService() ? null : (c.getBackendService().isAutocommit() + "").getBytes());
|
||||
row.add(null == c.getBackendService() ? null : StringUtil.encode(c.getBackendService().getStringOfSysVariables(), charset));
|
||||
row.add(null == c.getBackendService() ? null : StringUtil.encode(c.getBackendService().getStringOfUsrVariables(), charset));
|
||||
row.add(null == c.getBackendService() ? null : StringUtil.encode(c.getBackendService().getXaStatus().toString(), charset));
|
||||
row.add(StringUtil.encode(FormatUtil.formatDate(c.getPoolDestroyedTime()), charset));
|
||||
if (c.isClosed()) {
|
||||
if (null == c.getBackendService()) {
|
||||
row.add(null);
|
||||
} else if (state == PooledConnection.INITIAL) {
|
||||
ResponseHandler handler = c.getBackendService().getResponseHandler();
|
||||
|
||||
Reference in New Issue
Block a user