Bug 499385 - Socket Listen mode should allow multiple connections

Ensure we do not continue listening when explicitly told to stop.

Signed-off-by: Brian de Alwis <bsd@mt.ca>
Change-Id: Ic86d83124b58832bea77bc850ebf9701e3eb7975
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/SocketListenConnectorProcess.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/SocketListenConnectorProcess.java
index 15f8c7f..75c539c 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/SocketListenConnectorProcess.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/SocketListenConnectorProcess.java
@@ -145,7 +145,8 @@
 	 * Return true if this connector should continue listening for further connections.
 	 */
 	protected boolean continueListening() {
-		return !isTerminated() && (fConnectionLimit <= 0 || fConnectionLimit - fAccepted > 0);
+		return !isTerminated() && (fWaitForConnectionJob != null && !fWaitForConnectionJob.fListeningStopped)
+				&& (fConnectionLimit <= 0 || fConnectionLimit - fAccepted > 0);
 	}
 
 	/**