From 5d309ff52cd399a6b71968a6b9a70c8ac0b98981 Mon Sep 17 00:00:00 2001 From: Joel Kronqvist Date: Sat, 5 Mar 2022 19:02:27 +0200 Subject: Added node_modules for the updating to work properly. --- node_modules/mysql2/lib/commands/quit.js | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 node_modules/mysql2/lib/commands/quit.js (limited to 'node_modules/mysql2/lib/commands/quit.js') diff --git a/node_modules/mysql2/lib/commands/quit.js b/node_modules/mysql2/lib/commands/quit.js new file mode 100644 index 0000000..b9fe355 --- /dev/null +++ b/node_modules/mysql2/lib/commands/quit.js @@ -0,0 +1,29 @@ +'use strict'; + +const Command = require('./command.js'); +const CommandCode = require('../constants/commands.js'); +const Packet = require('../packets/packet.js'); + +class Quit extends Command { + constructor(callback) { + super(); + this.done = callback; + } + + start(packet, connection) { + connection._closing = true; + const quit = new Packet( + 0, + Buffer.from([1, 0, 0, 0, CommandCode.QUIT]), + 0, + 5 + ); + if (this.done) { + this.done(); + } + connection.writePacket(quit); + return null; + } +} + +module.exports = Quit; -- cgit v1.2.3