We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d976c86 commit 32660c5Copy full SHA for 32660c5
1 file changed
src/lib/ActionClient.js
@@ -138,6 +138,24 @@ class ActionClient extends EventEmitter {
138
});
139
return id;
140
}
141
+
142
+ /**
143
+ * Shuts down this ActionClient. It shuts down publishers, subscriptions
144
+ * and removes all attached event listeners.
145
+ * @returns {Promise}
146
+ */
147
148
+ shutdown() {
149
+ this.removeAllListeners();
150
151
+ return Promise.all([
152
+ this._goalPub.shutdown(),
153
+ this._cancelPub.shutdown(),
154
+ this._statusSub.shutdown(),
155
+ this._feedbackSub.shutdown(),
156
+ this._resultSub.shutdown()
157
+ ]);
158
+ }
159
160
161
module.exports = ActionClient;
0 commit comments