code: public synchronized void stop() {
          if (isRunning()) {
              socket.get().close();
              socket.set(null);
              deliverLifecycleAnnouncement(logger, false);
          }
      }
docs: Stop listening for beats.