mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-16 13:35:22 +02:00
bug 277061: [terminal] TelnetConnection.isConnected() should check if socket was not closed
https://bugs.eclipse.org/bugs/show_bug.cgi?id=277061
This commit is contained in:
parent
d9df109da5
commit
6b1f08b2f5
1 changed files with 3 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2005, 2008 Wind River Systems, Inc. and others.
|
||||
* Copyright (c) 2005, 2009 Wind River Systems, Inc. and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -12,6 +12,7 @@
|
|||
* Michael Scharf (Wind River) - split into core, view and connector plugins
|
||||
* 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) - [277061] TelnetConnection.isConnected() should check if socket was not closed
|
||||
*******************************************************************************/
|
||||
package org.eclipse.tm.internal.terminal.telnet;
|
||||
|
||||
|
@ -237,7 +238,7 @@ public class TelnetConnection extends Thread implements TelnetCodes {
|
|||
* connected, false otherwise.
|
||||
*/
|
||||
public boolean isConnected() {
|
||||
return socket != null && socket.isConnected();
|
||||
return socket != null && socket.isConnected() && !socket.isClosed();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue