buffet: Handle XMPP authentication failures

For the nightly tests there is a fake GCD server used, and as a result
the XMPP client can't authenticate with the XMPP server (since the
access_token is also fake). This simply closes the XMPP connection if we
see a read fail, so that we don't get spammed with 0 size reads.

TEST=manual and FEATURES=test emerge-whirlwind buffet
BUG=brillo:338

Change-Id: Ie8db114fcc197f816f3cb56673d6f393fa05c8e5
Reviewed-on: https://chromium-review.googlesource.com/251587
Reviewed-by: David Zeuthen <zeuthen@chromium.org>
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Nathan Bullock <nathanbullock@google.com>
Tested-by: Nathan Bullock <nathanbullock@google.com>
diff --git a/buffet/device_registration_info.h b/buffet/device_registration_info.h
index 780aeb3..4409d25 100644
--- a/buffet/device_registration_info.h
+++ b/buffet/device_registration_info.h
@@ -54,11 +54,7 @@
 
   ~DeviceRegistrationInfo() override;
 
-  void OnFileCanReadWithoutBlocking(int fd) override {
-    if (xmpp_client_ && xmpp_client_->GetFileDescriptor() == fd) {
-      xmpp_client_->Read();
-    }
-  }
+  void OnFileCanReadWithoutBlocking(int fd) override;
 
   void OnFileCanWriteWithoutBlocking(int fd) override {
     LOG(FATAL) << "No write watcher is configured";