diff --git a/CHANGELOG.md b/CHANGELOG.md index c5030ca..6150678 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## 1.3.1-r4 +## 1.3.3-r1 - Support writing base64 string data ## 1.3.1-r3 diff --git a/package.json b/package.json index 35a644c..cc1e866 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@blockstorage/repertory-js", - "version": "1.3.1-r4", + "version": "1.3.3-r1", "description": "A Node.js module for interfacing with Repertory's remote mount API", "author": "scott.e.graves@protonmail.com", "license": "MIT", diff --git a/src/networking/connection.js b/src/networking/connection.js index 43b9804..61cd6bd 100644 --- a/src/networking/connection.js +++ b/src/networking/connection.js @@ -60,6 +60,13 @@ export default class connection { this.cleanup_handlers(); buffer = null; }; + if (this.socket._socket) { + this.socket._socket.setNoDelay(true); + this.socket._socket.setKeepAlive(true); + } else { + this.socket.setNoDelay(true); + this.socket.setKeepAlive(true); + } this.socket.on('data', (chunk) => { buffer = buffer ? Buffer.concat([buffer, chunk]) : chunk; diff --git a/src/ops/index.js b/src/ops/index.js index 2898ac9..3c6f109 100644 --- a/src/ops/index.js +++ b/src/ops/index.js @@ -603,7 +603,7 @@ export const write_base64_file = async ( response.decode_ui32(); // Service flags const result = response.decode_i32(); - if (result === buffer.length) { + if (result > 0) { return result; } return Promise.reject(new Error(`'write_base64_file' error: ${result}`));