mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-24 08:44:01 +02:00
fix problem with connecting to ssl server that randomly occurs returning "null" for connect status.
This commit is contained in:
parent
cdbe580c99
commit
c458020bdc
1 changed files with 7 additions and 1 deletions
|
@ -656,6 +656,7 @@ public class ClientConnection implements IDataStoreConstants
|
||||||
|
|
||||||
reader = new BufferedReader(new InputStreamReader(_launchSocket.getInputStream(), DE.ENCODING_UTF_8));
|
reader = new BufferedReader(new InputStreamReader(_launchSocket.getInputStream(), DE.ENCODING_UTF_8));
|
||||||
String status = null;
|
String status = null;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
status = reader.readLine();
|
status = reader.readLine();
|
||||||
|
@ -664,12 +665,17 @@ public class ClientConnection implements IDataStoreConstants
|
||||||
{
|
{
|
||||||
result = new ConnectionStatus(false, e);
|
result = new ConnectionStatus(false, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (status != null && !status.equals(CONNECTED))
|
if (status != null && !status.equals(CONNECTED))
|
||||||
{
|
{
|
||||||
result = new ConnectionStatus(false, status);
|
result = new ConnectionStatus(false, status);
|
||||||
}
|
}
|
||||||
|
else if (status == null)
|
||||||
|
{
|
||||||
|
Exception e = new Exception("no status returned");
|
||||||
|
result = new ConnectionStatus(false, e);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
result = new ConnectionStatus(true);
|
result = new ConnectionStatus(true);
|
||||||
|
|
Loading…
Add table
Reference in a new issue