forked from cory/tildefriends
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:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user