buffet: Fix failed XMPP authorization issue
Right now, if XMPP notification channel is created early enough before
buffet was able to refresh the access token, XMPP might have invalid
or outdated credentials and XMPP SASL handshake would fail with
"not authorized" problem. Current code just retries the connection
attempt, but, sadly, using the same invalid credentials, which goes
into infinte loop of failed attempts.
Fixed the problem by making sure that XMPP authorization error causes
access token refresh and if authorization error occurrs, XMPP connection
will not be re-established until we get a new access token.
BUG=brillo:1174
TEST=`FEATURES=test emerge-link buffet`
Change-Id: Ieebfff26f4d06524819b2a5819f468e179cd2d6f
Reviewed-on: https://chromium-review.googlesource.com/273979
Trybot-Ready: Alex Vakulenko <avakulenko@chromium.org>
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Vitaly Buka <vitalybuka@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
7 files changed
tree: 8a0a53597dd826f571cb3b6f59a3f582ba2b1994
- buffet/