mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-14 20:45:22 +02:00
[227320] Fix endless loop in SshTerminalShell
This commit is contained in:
parent
c18cb2eaa9
commit
c75fe00c51
1 changed files with 17 additions and 2 deletions
|
@ -8,6 +8,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - initial API and implementation
|
* Martin Oberhuber (Wind River) - initial API and implementation
|
||||||
* Anna Dushistova (MontaVista) - [170910] Integrate the TM Terminal View with RSE
|
* Anna Dushistova (MontaVista) - [170910] Integrate the TM Terminal View with RSE
|
||||||
|
* Martin Oberhuber (Wind River) - [227320] Fix endless loop in SshTerminalShell
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.services.ssh.terminal;
|
package org.eclipse.rse.internal.services.ssh.terminal;
|
||||||
|
@ -193,8 +194,22 @@ public class SshTerminalShell extends AbstractTerminalShell {
|
||||||
|
|
||||||
public void exit() {
|
public void exit() {
|
||||||
if (fChannel != null) {
|
if (fChannel != null) {
|
||||||
fChannel.disconnect();
|
try {
|
||||||
isActive();
|
try {
|
||||||
|
getInputStream().close();
|
||||||
|
} catch (IOException ioe) {
|
||||||
|
/* ignore */
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
getOutputStream().close();
|
||||||
|
} catch (IOException ioe) {
|
||||||
|
/* ignore */
|
||||||
|
}
|
||||||
|
fChannel.disconnect();
|
||||||
|
} finally {
|
||||||
|
fChannel = null;
|
||||||
|
isActive();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue