@Override
	public void run() {
		try {
			if (checkCondition.call()) {
				try {
					checkProcessDidNotExit(process);
					if (showDialog) {
						Msg.info(this, "Waiting for GhidraGo to listen for new files...");
						// show the dialog in a blocking action. This will throw a StopWaitingException
						// if they answer No. Otherwise, they want to keep waiting.
						dialog.showDialog();
					}
					executor.schedule(this, period, timeUnit);
				}
				catch (StopWaitingException e) {
					this.stopWaitingException = e;
					dispose();
				}
				catch (StartedGhidraProcessExitedException e) {
					this.startedGhidraProcessExitedException = e;
					dispose();
				}
				catch (RejectedExecutionException e) {
					// this is okay, executor has been shutdown
					dispose();
				}
			}
			else {
				dispose();
			}
		}
		catch (Exception e) {
			Swing.runNow(() -> Msg.showError(this, null, "GhidraGo Unable to Check For Listener",
				"GhidraGo could not check for a listener.", e));
			dispose();
		}
	}
Maximum amount of time to wait for a listening Ghidra
Ghidra/Features/GhidraGo/src/main/java/ghidra/app/plugin/core/go/ipc/CheckForListenerRunnable.java