So there is this really really huge MUC at #matrix#matrix.org@bridge.xmpp.matrix.org, with currently ~5300 occupants. When I attempt to join it, the first issue is that the domain does not advertise MUC and the multiUserChatManager.providesMucService(mucService) check fails.

Once that is circumvented, though, the regular MUC join timeout of 30s times out. I don’t want to make this timeout huge by default, because other MUCs aren’t that huge. And on the other hand, it would be much more useful to have a timeout that means “when no more data comes in from the MUC for X seconds”, and not “when the join isn’t completed in X seconds”.

The timeout of the stanza collector waiting for the self presence on MUC join should reset for every presence (message?) received from the MUC. This is a pattern already used in some parts of Smack, e.g. MAM.

Speaking of which, the timeout value in the exception text is incorrect. It doesn’t come from the nextResultOrThrow() parameter but from connection.getReplyTimeout() called out of SmackException.getWaitingFor()`. With the super-precise value this comes as a surprise. And it would probably suffice to round it to seconds anyway.