private void checkConnections() {

		String[] eventNames = connectHt.getKeys();
		boolean connectionFound = false;
		for (String eventName : eventNames) {
			try {
				int value = connectHt.get(eventName);
				if (value == CONNECTED) {
					connectionFound = true;
					break;
				}
			}
			catch (NoValueException e) {
				Msg.showError(this, null, "Error", "Event name not in table: " + e.getMessage());
			}
		}
		if (!connectionFound) {
			producerTool.removeToolListener(this);
			listenerAdded = false;
		}
	}
Check the connections; if there are none, then remove the
consumer tool as a listener on the producer tool; called
when a disconnect is made.
Ghidra/Framework/Project/src/main/java/ghidra/framework/project/tool/ToolConnectionImpl.java