Merge pull request #312 from matrix-org/rav/eventlistnener_warning

Fix eventListener warning
pull/21833/head
David Baker 2016-06-16 11:15:08 +01:00 committed by GitHub
commit 624e34c48a
1 changed files with 6 additions and 1 deletions

View File

@ -50,6 +50,11 @@ function createClientForPeg(hs_url, is_url, user_id, access_token, guestAccess)
} }
matrixClient = Matrix.createClient(opts); matrixClient = Matrix.createClient(opts);
// we're going to add eventlisteners for each matrix event tile, so the
// potential number of event listeners is quite high.
matrixClient.setMaxListeners(500);
if (guestAccess) { if (guestAccess) {
console.log("Guest: %s", guestAccess.isGuest()); console.log("Guest: %s", guestAccess.isGuest());
matrixClient.setGuest(guestAccess.isGuest()); matrixClient.setGuest(guestAccess.isGuest());
@ -91,7 +96,7 @@ class MatrixClient {
} }
// FIXME, XXX: this all seems very convoluted :( // FIXME, XXX: this all seems very convoluted :(
// //
// if we replace the singleton using URLs we bypass our createClientForPeg() // if we replace the singleton using URLs we bypass our createClientForPeg()
// global helper function... but if we replace it using // global helper function... but if we replace it using
// an access_token we don't? // an access_token we don't?