code: @Override
      public void stop() {
          System.out.print("Stopping the client...");
          client.disconnect();
          System.out.println("done");
      }
docs: Disconnect the client when the application is closed.