code: @SuppressWarnings("WeakerAccess")
      public synchronized void stop() {
          if (isRunning()) {
              final Set<DeviceAnnouncement> lastDevices = getCurrentDevices();
              socket.get().close();
              socket.set(null);
              devices.clear();
              firstDeviceTime.set(0);
              // Report the loss of all our devices, on the proper thread, outside our lock
              SwingUtilities.invokeLater(new Runnable() {
                  @Override
                  public void run() {
                      for (DeviceAnnouncement announcement : lastDevices) {
                          deliverLostAnnouncement(announcement);
                      }
                  }
              });
              deliverLifecycleAnnouncement(logger, false);
          }
      }
docs: Stop listening for device announcements. Also discard any announcements which had been received, and
  notify any registered listeners that those devices have been lost.