Support for policy-violations

Issue #32 new
Markus KARG created an issue

Some (possibly most public?) servers contrain the communication with the client in some way, by applying policies. One policy might be that the data transmission is slowed down, another policy might be to restrict the number of logins per time. Both policies are in place with jabber.de for example.

I noticed that if such a policy prevents connection, no reconnect happens. Apparently Babbler is not assuming such policies (see stack trance below).

It might be a good future improvement to add some minimal support for "safe" reaction upoin failed policies, like reconnecting after some time.

OUT: </stream:stream>
Mar 08, 2015 1:01:15 PM rocks.xmpp.core.session.XmppSession connect INFORMATION: XmppSession:BEFORE throwAsXmppExceptionIfNotNull rocks.xmpp.core.stream.StreamErrorException: <policy-violation/>
        You exceeded the number of connections/logins allowed in 60 seconds, good bye.
Mar 08, 2015 1:01:15 PM rocks.xmpp.core.session.XmppSession connect 
<policy-violation/>
        You exceeded the number of connections/logins allowed in 60 seconds, good bye.

Comments (0)

  1. Log in to comment