diff --git a/.nvmrc b/.nvmrc index 368fe85..18e0a5e 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v8.12.0 +v8.14.0 diff --git a/lib/server/command_processor.js b/lib/server/command_processor.js index 82c9ad1..7a101d8 100644 --- a/lib/server/command_processor.js +++ b/lib/server/command_processor.js @@ -25,6 +25,7 @@ class CommandProcessor extends Duplex { putStream: this._handleWrite.bind(this), command: this._handleCommand.bind(this), version: this._handleVersion.bind(this), + none: () => Promise.resolve() }; this._writeHandler = this._writeHandlers.version; diff --git a/package.json b/package.json index c7d17d0..de52f01 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,10 @@ { "name": "unity-cache-server", - "version": "6.2.0", + "version": "6.2.1", "description": "Unity Cache Server", "main": "lib/index.js", "engines": { - "node": "^8.12.0" + "node": "^8.14.0" }, "directories": { "test": "test" diff --git a/test/protocol.js b/test/protocol.js index 33b9aa8..da00ea1 100644 --- a/test/protocol.js +++ b/test/protocol.js @@ -241,7 +241,6 @@ describe("Protocol", () => { it("should close file streams if the client drops before finished reading", async () => { const resp = new CacheServerResponseTransform(); - resp.on('data', () => {}); client.pipe(resp); const buf = Buffer.from(encodeCommand(cmd.getAsset, self.data.guid, self.data.hash), 'ascii'); @@ -254,9 +253,12 @@ describe("Protocol", () => { } // quit immediately - client.write(Buffer.from(encodeCommand(cmd.quit), 'ascii')); + resp.on('header', () => { + client.write(Buffer.from(encodeCommand(cmd.quit), 'ascii')); + }); return new Promise(resolve => { + resp.on('data', () => {}); expectLog(client, /Destroying cache file readStream/i, resolve); }); });