webui: protection for failures in comet callbacks

Previously it was possible for such an error to result in a total failure of
the comet system.
This commit is contained in:
Adam Sutton 2013-11-17 20:55:40 +00:00
parent b510e60272
commit 7d8360eddd

View file

@ -60,7 +60,11 @@ tvheadend.cometPoller = function() {
tvheadend.boxid = response.boxid
for (x = 0; x < response.messages.length; x++) {
m = response.messages[x];
tvheadend.comet.fireEvent(m.notificationClass, m);
try {
tvheadend.comet.fireEvent(m.notificationClass, m);
} catch (e) {
tvheadend.log('comet failure [e=' + e.message + ']');
}
}
cometRequest.delay(100);
}