diff --git a/CHANGES.md b/CHANGES.md index fa707ec..acdc7b6 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,11 @@ None yet. +## v3.1.1 + +* Added fsr_context.removeSocketEndListener() method so that long running RPC + calls can remove their listener. + ## v3.1.0 * Added fsr_context.addSocketEndListener() method so that long running RPC diff --git a/lib/fast_server.js b/lib/fast_server.js index 1bfcff5..a5963d8 100644 --- a/lib/fast_server.js +++ b/lib/fast_server.js @@ -1210,6 +1210,10 @@ function FastRpcServerRequest(args) function ctxAddSocketEndListener(listener) { request.fsr_conn.fc_socket.once('end', listener); }; + this.fsr_context.removeSocketEndListener = + function ctxRemoveSocketEndListener(listener) { + request.fsr_conn.fc_socket.removeListener('end', listener); + }; this.fsr_context.argv = function ctxArgv() { /* * For clarity and debuggability, callers ought to avoid mucking diff --git a/package.json b/package.json index 4c8d299..749e776 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "fast", "description": "streaming JSON RPC over TCP", - "version": "3.1.0", + "version": "3.1.1", "main": "./lib/fast.js", "repository": { "type": "git",