Slightly improved error handling, some heuristics for number of cores to build with, and misc. work in progress changes.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3246 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2016-06-12 13:45:57 +00:00
parent 61ea965080
commit ef1fa591e5
4 changed files with 28 additions and 5 deletions

View File

@ -48,7 +48,12 @@ exports.ChatService = class {
for (let i = self._callbacks.length - 1; i >= 0; i--) {
let callback = self._callbacks[i];
try {
callback(message);
callback(message).catch(function(error) {
self._callbacks.splice(i, 1);
// XXX: Send it to the other connections?
print(error);
});
} catch (error) {
self._callbacks.splice(i, 1);