Skip to content
This repository was archived by the owner on Jan 9, 2023. It is now read-only.

Commit 0357d34

Browse files
Bump version for new release; move to latest node patch release v8.14.0 (#83)
* Bump version for new release * Move to latest node patch release v8.14.0 * Refactor test for stability
1 parent ca2d233 commit 0357d34

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v8.12.0
1+
v8.14.0

lib/server/command_processor.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class CommandProcessor extends Duplex {
2525
putStream: this._handleWrite.bind(this),
2626
command: this._handleCommand.bind(this),
2727
version: this._handleVersion.bind(this),
28+
none: () => Promise.resolve()
2829
};
2930

3031
this._writeHandler = this._writeHandlers.version;

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "unity-cache-server",
3-
"version": "6.2.0",
3+
"version": "6.2.1",
44
"description": "Unity Cache Server",
55
"main": "lib/index.js",
66
"engines": {
7-
"node": "^8.12.0"
7+
"node": "^8.14.0"
88
},
99
"directories": {
1010
"test": "test"

test/protocol.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,6 @@ describe("Protocol", () => {
241241

242242
it("should close file streams if the client drops before finished reading", async () => {
243243
const resp = new CacheServerResponseTransform();
244-
resp.on('data', () => {});
245244
client.pipe(resp);
246245

247246
const buf = Buffer.from(encodeCommand(cmd.getAsset, self.data.guid, self.data.hash), 'ascii');
@@ -254,9 +253,12 @@ describe("Protocol", () => {
254253
}
255254

256255
// quit immediately
257-
client.write(Buffer.from(encodeCommand(cmd.quit), 'ascii'));
256+
resp.on('header', () => {
257+
client.write(Buffer.from(encodeCommand(cmd.quit), 'ascii'));
258+
});
258259

259260
return new Promise(resolve => {
261+
resp.on('data', () => {});
260262
expectLog(client, /Destroying cache file readStream/i, resolve);
261263
});
262264
});

0 commit comments

Comments
 (0)