fix bug: wrong quit command implementation (#2554)

This commit is contained in:
jianqingdu
2020-02-28 10:52:35 +08:00
committed by GitHub
parent 9cc8caa834
commit 4fc7e5f7d9

View File

@@ -13,8 +13,6 @@ import com.alibaba.otter.canal.parse.driver.mysql.packets.CommandPacket;
*/
public class QuitCommandPacket extends CommandPacket {
public static final byte[] QUIT = new byte[] { 1, 0, 0, 0, 1 };
public QuitCommandPacket(){
setCommand((byte) 0x01);
}
@@ -28,7 +26,6 @@ public class QuitCommandPacket extends CommandPacket {
public byte[] toBytes() throws IOException {
ByteArrayOutputStream out = new ByteArrayOutputStream();
out.write(getCommand());
out.write(QUIT);
return out.toByteArray();
}