Closed psyzz closed 7 years ago
If you are using the provided example, you can see this line called setInterval(function, 5000)
which means the heartbeat function would be called every 5 seconds.
Here are two ways to 'stop' it.
setInterval
call, simply call the heartbeat function whenever you wantsetInterval
into a variable and call clearInterval
later, e.g., var a = setInterval(somefunction, 5000); clearInterval(a);
Hi, thanks for your job,
i'm looking to stop the Heartbeat but it seems to never stop ?
How can i close the connection ? Like
Thanks!