Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.equinox.console.ssh/src/org/eclipse/equinox/console/ssh/SshCommand.java')
-rwxr-xr-xbundles/org.eclipse.equinox.console.ssh/src/org/eclipse/equinox/console/ssh/SshCommand.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.console.ssh/src/org/eclipse/equinox/console/ssh/SshCommand.java b/bundles/org.eclipse.equinox.console.ssh/src/org/eclipse/equinox/console/ssh/SshCommand.java
index 64440adbb..88ef0a78f 100755
--- a/bundles/org.eclipse.equinox.console.ssh/src/org/eclipse/equinox/console/ssh/SshCommand.java
+++ b/bundles/org.eclipse.equinox.console.ssh/src/org/eclipse/equinox/console/ssh/SshCommand.java
@@ -187,7 +187,8 @@ public class SshCommand {
}
} else if ("stop".equals(command)) {
if (sshServ == null) {
- throw new IllegalStateException("ssh is not running.");
+ System.out.println("ssh is not running.");
+ return;
}
sshServ.stopSshServer();
@@ -197,12 +198,16 @@ public class SshCommand {
public synchronized void addCommandProcessor(CommandProcessor processor) {
processors.add(processor);
- sshServ.addCommandProcessor(processor);
+ if (sshServ != null) {
+ sshServ.addCommandProcessor(processor);
+ }
}
public synchronized void removeCommandProcessor(CommandProcessor processor) {
processors.remove(processor);
- sshServ.removeCommandProcessor(processor);
+ if (sshServ != null) {
+ sshServ.removeCommandProcessor(processor);
+ }
}
private void checkPortAvailable(int port) throws Exception {

Back to the top