Skip to content
This repository has been archived by the owner on May 26, 2018. It is now read-only.

Commit

Permalink
Merge pull request #34 from GermanBluefox/master
Browse files Browse the repository at this point in the history
Fix update interval if too short.
  • Loading branch information
hobbyquaker committed Nov 28, 2013
2 parents e792d44 + 930d7e0 commit 79b5efe
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ccu.io/adapter/ping/ping.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* CCU.IO Ping Adapter
* 11'2013 Bluefox
*
* Version 0.1
* Version 0.2
*
*/
var settings = require(__dirname+'/../../settings.js');
Expand Down Expand Up @@ -107,6 +107,7 @@ function pingInit () {
Parent: dp
});
dp += 2;
i++;
}

setObject(pingSettings.firstId, {
Expand All @@ -119,6 +120,10 @@ function pingInit () {
});

logger.info("adapter ping inserted objects");
// Fix polling interval if too short
if (pingSettings.pollingInterval <= 5000 * (i + 1)) {
pingSettings.pollingInterval = 5000 * (i + 1);
}

logger.info("adapter ping polling enabled - interval "+pingSettings.pollingInterval+"ms");

Expand Down

0 comments on commit 79b5efe

Please sign in to comment.