mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-07 16:26:11 +02:00
[245714] don't launch a server when we're not able to read from the socket in the ServerLauncher
This commit is contained in:
parent
daf798e433
commit
1484919e21
1 changed files with 138 additions and 131 deletions
|
@ -14,6 +14,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* David McKnight (IBM) - [193426] don't display exceptions
|
* David McKnight (IBM) - [193426] don't display exceptions
|
||||||
* David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
|
* David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
|
||||||
|
* David McKnight (IBM) - [245714] [dstore] Multiple user ID/password prompts and connect fails
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.dstore.core.server;
|
package org.eclipse.dstore.core.server;
|
||||||
|
@ -207,6 +208,8 @@ public class ServerLauncher extends Thread {
|
||||||
String password = null;
|
String password = null;
|
||||||
|
|
||||||
_port = null;
|
_port = null;
|
||||||
|
|
||||||
|
boolean problemReadingSocket = false;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
user = _reader.readLine();
|
user = _reader.readLine();
|
||||||
|
@ -218,8 +221,11 @@ public class ServerLauncher extends Thread {
|
||||||
// don't display exceptions 193426
|
// don't display exceptions 193426
|
||||||
//e.printStackTrace();
|
//e.printStackTrace();
|
||||||
_port = "0"; //$NON-NLS-1$
|
_port = "0"; //$NON-NLS-1$
|
||||||
}
|
|
||||||
|
|
||||||
|
// this is probably an SSL exception
|
||||||
|
_writer.println(IDataStoreConstants.SERVER_FAILURE + e);
|
||||||
|
problemReadingSocket = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (_serverPortRange != null && (_port == null || _port.equals("0"))) //$NON-NLS-1$
|
if (_serverPortRange != null && (_port == null || _port.equals("0"))) //$NON-NLS-1$
|
||||||
|
@ -227,6 +233,7 @@ public class ServerLauncher extends Thread {
|
||||||
_port = _serverPortRange;
|
_port = _serverPortRange;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!problemReadingSocket)
|
||||||
{
|
{
|
||||||
boolean isError = false;
|
boolean isError = false;
|
||||||
if (_serverPortRange != null && _port != _serverPortRange)
|
if (_serverPortRange != null && _port != _serverPortRange)
|
||||||
|
|
Loading…
Add table
Reference in a new issue