1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-13 12:05:21 +02:00

[fix] Bug 281329: Telnet connection not handling "SocketException: Connection reset" correct

This commit is contained in:
Uwe Stieber 2009-06-25 06:52:55 +00:00
parent 4b78900f89
commit f05f0ebf99

View file

@ -13,6 +13,7 @@
* Martin Oberhuber (Wind River) - fixed copyright headers and beautified * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
* Michael Scharf (Wind River) - [209665] Add ability to log byte streams from terminal * Michael Scharf (Wind River) - [209665] Add ability to log byte streams from terminal
* Alex Panchenko (Xored) - [277061] TelnetConnection.isConnected() should check if socket was not closed * Alex Panchenko (Xored) - [277061] TelnetConnection.isConnected() should check if socket was not closed
* Uwe Stieber (Wind River) - [281329] Telnet connection not handling "SocketException: Connection reset" correct
*******************************************************************************/ *******************************************************************************/
package org.eclipse.tm.internal.terminal.telnet; package org.eclipse.tm.internal.terminal.telnet;
@ -330,10 +331,14 @@ public class TelnetConnection extends Thread implements TelnetCodes {
// A "socket closed" exception is normal here. It's caused by the // A "socket closed" exception is normal here. It's caused by the
// user clicking the disconnect button on the Terminal view toolbar. // user clicking the disconnect button on the Terminal view toolbar.
if (message != null && !message.equals("socket closed")) //$NON-NLS-1$ if (message != null && !message.equals("socket closed") && !message.equalsIgnoreCase("Connection reset")) //$NON-NLS-1$ //$NON-NLS-2$
{ {
Logger.logException(ex); Logger.logException(ex);
} }
// Tell the ITerminalControl object that the connection is
// closed.
terminalControl.setState(TerminalState.CLOSED);
} catch (Exception ex) { } catch (Exception ex) {
Logger.logException(ex); Logger.logException(ex);
} }