Skip to content

Commit

Permalink
Merge pull request #656 from prey/Fix-connection-issue-ws
Browse files Browse the repository at this point in the history
Fix connection issue
  • Loading branch information
SoraKenji authored Aug 1, 2022
2 parents 343dff5 + f373b68 commit b01a5ec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/agent/plugins/control-panel/websockets/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@ const updateStoredConnection = (newStoredTime) => {
})
}
exports.heartbeat = () => {
if (!ws || !ws.readyState || ws.readyState !== 1) exports.heartbeatTimed(21000);
if (!ws || !ws.readyState || ws.readyState !== 1) exports.heartbeatTimed(15000);
};

exports.heartbeatTimed = (timeToRetry) => {
if (pingTimeout) clearTimeout(pingTimeout);
pingTimeout = setTimeout(() => {
Expand Down

0 comments on commit b01a5ec

Please sign in to comment.