One-com/livestyle — pull request #26 by simonz05 (2012-05-23 08:24:22+00:00)
Title:  simplify isBusyByHref logic

I don't understand the isBusyByHref logic in livestyle-client.js, but I'm sure
it's not working as intended. In my case livestyle will only work for 1-4
updates, before a href enters an always busy state. In this state the href will
no longer be updated due to;

if (isBusyByHref[changedHrefsQueue[i]]) {
if (liveStyleOptions.debug) {
log("Postponing 'change' notification on stylesheet that's already being refreshed: " + changedHrefsQueue[i]);
}
}

Here follows the debug from browser, including an added print state for isBusyByHref

Received change notification for /static/style.css, queued
line 175: 0
Refreshing /static/style.css :5001/profile/1/:31
line 127: 1
line 143: 0
line 143: -1
Received change notification for /static/style.css, queued :5001/profile/1/:31
line 175: -1
Postponing 'change' notification on stylesheet that's already being refreshed: /static/style.css
Received change notification for /static/style.css, skipped (already in queue)
Received change notification for /static/style.css, skipped (already in queue)

I fixed this issue for me by simply using true/false, but since you did this with the numeric states in the first place there probably is a reason for it, so please review and test before applying.