Fix stats.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3869 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
parent
0d1b231344
commit
2826efea56
@ -141,11 +141,7 @@ function socket(request, response, client) {
|
||||
}
|
||||
} else if (message.action == 'enableStats') {
|
||||
if (process) {
|
||||
process.stats = message.enabled;
|
||||
if (!gStatsTimer) {
|
||||
sendStats();
|
||||
gStatsTimer = true;
|
||||
}
|
||||
core.enableStats(process, message.enabled);
|
||||
}
|
||||
} else {
|
||||
if (process && process.eventHandlers['message']) {
|
||||
|
@ -559,6 +559,14 @@ function sendStats() {
|
||||
}
|
||||
}
|
||||
|
||||
function enableStats(process, enabled) {
|
||||
process.stats = enabled;
|
||||
if (!gStatsTimer) {
|
||||
gStatsTimer = true;
|
||||
sendStats();
|
||||
}
|
||||
}
|
||||
|
||||
loadSettings().then(function() {
|
||||
var auth = require("auth");
|
||||
var httpd = require("httpd");
|
||||
@ -601,3 +609,4 @@ exports.getSessionProcessBlob = getSessionProcessBlob;
|
||||
exports.invoke = invoke;
|
||||
exports.globalSettings = gGlobalSettings;
|
||||
exports.setGlobalSettings = setGlobalSettings;
|
||||
exports.enableStats = enableStats;
|
||||
|
Loading…
Reference in New Issue
Block a user