1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-04 15:45:25 +02:00

[227320] Fix endless loop in SshTerminalShell

This commit is contained in:
Martin Oberhuber 2008-04-16 13:44:12 +00:00
parent c18cb2eaa9
commit c75fe00c51

View file

@ -8,6 +8,7 @@
* Contributors:
* Martin Oberhuber (Wind River) - initial API and implementation
* 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;
@ -193,8 +194,22 @@ public class SshTerminalShell extends AbstractTerminalShell {
public void exit() {
if (fChannel != null) {
fChannel.disconnect();
isActive();
try {
try {
getInputStream().close();
} catch (IOException ioe) {
/* ignore */
}
try {
getOutputStream().close();
} catch (IOException ioe) {
/* ignore */
}
fChannel.disconnect();
} finally {
fChannel = null;
isActive();
}
}
}