mirror of
https://github.com/actiontech/dble.git
synced 2026-04-30 03:21:14 -05:00
avoid the case that the packet sequence is field,eof,err (#2318)
This commit is contained in:
@@ -69,7 +69,12 @@ public class RWSplitHandler implements ResponseHandler, LoadDataResponseHandler,
|
|||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
if (!write2Client) {
|
if (!write2Client) {
|
||||||
data[3] = (byte) rwSplitService.nextPacketId();
|
data[3] = (byte) rwSplitService.nextPacketId();
|
||||||
frontedConnection.write(data);
|
if (buffer != null) {
|
||||||
|
buffer = rwSplitService.writeToBuffer(data, buffer);
|
||||||
|
frontedConnection.write(buffer);
|
||||||
|
} else {
|
||||||
|
frontedConnection.write(data);
|
||||||
|
}
|
||||||
write2Client = true;
|
write2Client = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -269,6 +269,7 @@ public class RWSplitService extends BusinessService {
|
|||||||
super.cleanup();
|
super.cleanup();
|
||||||
if (session != null) {
|
if (session != null) {
|
||||||
TsQueriesCounter.getInstance().addToHistory(this);
|
TsQueriesCounter.getInstance().addToHistory(this);
|
||||||
|
session.close("clean up");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user