Skip to content

Commit 73a19b4

Browse files
committed
feat: 🎸 Added requests pruning to the Node example
1 parent 4f686fe commit 73a19b4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎examples/node/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,10 @@ const main = async (): Promise<void> => {
224224
createRequestsHandler(node, queue),
225225
);
226226

227+
node.addEventListener('heartbeat', () => {
228+
requestManager.prune();
229+
});
230+
227231
node.addEventListener('message', (e) => {
228232
const { topic, data } = e.detail;
229233
// here you are able to pre-validate arrived messages

0 commit comments

Comments
 (0)