New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ss-utils

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ss-utils - npm Package Compare versions

Comparing version 0.2.4 to 0.2.5

2

package.json
{
"name": "ss-utils",
"title": "ServiceStack JavaScript Utils",
"version": "0.2.4",
"version": "0.2.5",
"description": "ServiceStack's JavaScript library providing a number of convenience utilities in developing javascript web apps. Integrates with ServiceStack's Server features including Error Handling, Validation and Server Events",

@@ -6,0 +6,0 @@ "homepage": "https://github.com/ServiceStack/ss-utils",

@@ -706,26 +706,30 @@ ;(function (root, f) {

if (opt.heartbeatUrl) {
if (opt.heartbeat) {
window.clearInterval(opt.heartbeat);
}
opt.heartbeat = window.setInterval(function () {
if ($.ss.eventSource.readyState === 2) //CLOSED
{
window.clearInterval(opt.heartbeat);
var stopFn = $.ss.handlers["onStop"];
if (stopFn != null)
stopFn.apply($.ss.eventSource);
$.ss.reconnectServerEvents({ errorArgs: { error:'CLOSED' } });
return;
$.ss.CONNECT_ID = $.ss.CONNECT_ID ? $.ss.CONNECT_ID + 1 : 1;
(function(connectId) {
function sendHeartbeat() {
if (connectId !== $.ss.CONNECT_ID) // Only allow latest connections heartbeat callback through
return;
if ($.ss.eventSource.readyState === 2) //CLOSED
{
var stopFn = $.ss.handlers["onStop"];
if (stopFn != null)
stopFn.apply($.ss.eventSource);
$.ss.reconnectServerEvents({ errorArgs: { error:'CLOSED' } });
return;
}
$.ajax({
type: "POST",
url: opt.heartbeatUrl,
data: null,
dataType: "text",
success: function (r) {
setTimeout(sendHeartbeat, parseInt(opt.heartbeatIntervalMs) || 10000)
},
error: function () {
$.ss.reconnectServerEvents({ errorArgs: arguments });
}
});
}
$.ajax({
type: "POST",
url: opt.heartbeatUrl,
data: null,
dataType: "text",
success: function (r) { },
error: function () {
$.ss.reconnectServerEvents({ errorArgs: arguments });
}
});
}, parseInt(opt.heartbeatIntervalMs) || 10000);
setTimeout(sendHeartbeat, parseInt(opt.heartbeatIntervalMs) || 10000);
})($.ss.CONNECT_ID);
}

@@ -732,0 +736,0 @@ if (opt.unRegisterUrl) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc