mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-03 07:05:24 +02:00
[242968] [multithread] serverSocket must be closed when an exception happens in Accept
This commit is contained in:
parent
530678eadf
commit
006e65e149
1 changed files with 11 additions and 0 deletions
|
@ -21,6 +21,7 @@
|
|||
* Noriaki Takatsu (IBM) - [226074] process for getStatus() API
|
||||
* Noriaki Takatsu (IBM) - [226237] [dstore] Move the place where the ServerLogger instance is made
|
||||
* David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
|
||||
* Noriaki Takatsu (IBM) - [242968] [multithread] serverSocket must be closed when an exception happens in Accept
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.dstore.core.server;
|
||||
|
@ -262,6 +263,15 @@ public class ConnectionEstablisher
|
|||
{
|
||||
System.err.println(ServerReturnCodes.RC_CONNECTION_ERROR);
|
||||
System.err.println("Server: error initializing socket: " + ioe); //$NON-NLS-1$
|
||||
_msg = ioe.toString();
|
||||
try
|
||||
{
|
||||
_serverSocket.close();
|
||||
}
|
||||
catch (Throwable e)
|
||||
{
|
||||
|
||||
}
|
||||
_continue = false;
|
||||
}
|
||||
}
|
||||
|
@ -438,6 +448,7 @@ public class ConnectionEstablisher
|
|||
|
||||
System.err.println(ServerReturnCodes.RC_SUCCESS);
|
||||
System.err.println(_serverSocket.getLocalPort());
|
||||
_msg = ServerReturnCodes.RC_SUCCESS;
|
||||
try
|
||||
{
|
||||
System.err.println("Server running on: " + InetAddress.getLocalHost().getHostName()); //$NON-NLS-1$
|
||||
|
|
Loading…
Add table
Reference in a new issue