* working on feature ftue

This commit is contained in:
Seth Call 2014-04-28 19:47:24 +00:00
parent 3b3776f065
commit 9b18849544
3 changed files with 8 additions and 3 deletions

View File

@ -156,9 +156,10 @@
// for debugging purposes, see if the last time we've sent a heartbeat is way off (500ms) of the target interval
var now = new Date();
if (lastHeartbeatSentTime) {
if(lastHeartbeatSentTime) {
var drift = new Date().getTime() - lastHeartbeatSentTime.getTime() - heartbeatMS;
if (drift > 500) {
if(drift > 500) {
logger.error("significant drift between heartbeats: " + drift + 'ms beyond target interval')
}
}
@ -460,7 +461,8 @@
connectTimeout = setTimeout(function () {
connectTimeout = null;
if (connectDeferred.state() === 'pending') {
if(connectDeferred.state() === 'pending') {
server.close(true);
connectDeferred.reject();
}

View File

@ -285,10 +285,12 @@
// Check, disable or indeterminate
if (/^(ch|di|in)/.test(method) && !active) {
console.log("TAKING ROUTE: ", state);
on(input, state);
// Uncheck, enable or determinate
} else if (/^(un|en|de)/.test(method) && active) {
console.log("TAKING ROUTE2: ", state);
off(input, state);
// Update

View File

@ -393,6 +393,7 @@ module JamWebsockets
@log.debug "cleaned up not-logged-in client #{client}"
else
@log.debug "cleanup up logged-in client #{client}"
context = @clients.delete(client)
if context