From e99167d9d460882e38b9a0b552e4e77e2db1a74c Mon Sep 17 00:00:00 2001 From: Jose Rego Date: Tue, 10 Sep 2024 14:53:20 +0100 Subject: [PATCH] fix: pass callback to heartbeat call --- lib/connection/connection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/connection/connection.js b/lib/connection/connection.js index c5d517324..55a30ca43 100644 --- a/lib/connection/connection.js +++ b/lib/connection/connection.js @@ -176,7 +176,7 @@ function Connection(context) { function connectCallback(self, callback) { return function (err) { if (Parameters.getValue(Parameters.names.CLIENT_SESSION_KEEP_ALIVE)) { - self.keepalive = setInterval(self.heartbeat, Parameters.getValue(Parameters.names.CLIENT_SESSION_KEEP_ALIVE_HEARTBEAT_FREQUENCY) * 1000, self); + self.keepalive = setInterval(self.heartbeat, Parameters.getValue(Parameters.names.CLIENT_SESSION_KEEP_ALIVE_HEARTBEAT_FREQUENCY) * 1000, callback); } if (Util.isFunction(callback)) { callback(Errors.externalize(err), self);