mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-04 23:05:47 +02:00
[322407][dstore] Connection dropped automatically when idle
This commit is contained in:
parent
416f108acf
commit
843372ee75
1 changed files with 24 additions and 13 deletions
|
@ -19,6 +19,7 @@
|
||||||
* David McKnight (IBM) [246826][dstore] KeepAlive does not work correctly
|
* David McKnight (IBM) [246826][dstore] KeepAlive does not work correctly
|
||||||
* David McKnight (IBM) [305218][dstore] problem reading double-byte characters through data socket layer
|
* David McKnight (IBM) [305218][dstore] problem reading double-byte characters through data socket layer
|
||||||
* David McKnight (IBM) [307541][dstore] fix for Bug 305218 breaks RDz connections
|
* David McKnight (IBM) [307541][dstore] fix for Bug 305218 breaks RDz connections
|
||||||
|
* David McKnight (IBM) [322407][dstore] Connection dropped automatically when idle
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.dstore.internal.core.util;
|
package org.eclipse.dstore.internal.core.util;
|
||||||
|
@ -328,20 +329,30 @@ public class XMLparser
|
||||||
_initialKart.start();
|
_initialKart.start();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (_initialKart != null && !_initialKart.isAlive())
|
else if (_initialKart != null)
|
||||||
{
|
{
|
||||||
if (!_initialKart.failed())
|
if (_initialKart.isAlive()){
|
||||||
{
|
int currentTimeout = socket.getSoTimeout();
|
||||||
_isKeepAliveCompatible = true;
|
if (currentTimeout != IO_SOCKET_READ_TIMEOUT){
|
||||||
if (VERBOSE_KEEPALIVE) System.out.println("KeepAlive compatible."); //$NON-NLS-1$
|
if (VERBOSE_KEEPALIVE) System.out.println("Resetting timeout from " + currentTimeout + " to " + IO_SOCKET_READ_TIMEOUT); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
_initialKart = null;
|
socket.setSoTimeout(IO_SOCKET_READ_TIMEOUT);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
_isKeepAliveCompatible = false;
|
|
||||||
if (VERBOSE_KEEPALIVE) System.out.println("KeepAlive incompatible."); //$NON-NLS-1$
|
|
||||||
_initialKart = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_initialKart.isAlive()){
|
||||||
|
if (!_initialKart.failed())
|
||||||
|
{
|
||||||
|
_isKeepAliveCompatible = true;
|
||||||
|
if (VERBOSE_KEEPALIVE) System.out.println("KeepAlive compatible."); //$NON-NLS-1$
|
||||||
|
_initialKart = null;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_isKeepAliveCompatible = false;
|
||||||
|
if (VERBOSE_KEEPALIVE) System.out.println("KeepAlive incompatible."); //$NON-NLS-1$
|
||||||
|
_initialKart = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -383,7 +394,7 @@ public class XMLparser
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else // no keepalive
|
||||||
{
|
{
|
||||||
in = reader.read();
|
in = reader.read();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue