1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-02 22:55:26 +02:00

[282364] [dstore][multithread] timer-threads stay active after disconnect

This commit is contained in:
David McKnight 2011-01-10 14:48:44 +00:00
parent 59049b8978
commit ed172f6eb3
3 changed files with 24 additions and 3 deletions

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2002, 2010 IBM Corporation and others.
* Copyright (c) 2002, 2011 IBM Corporation 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
@ -18,6 +18,7 @@
* David McKnight (IBM) - [225507][api][breaking] RSE dstore API leaks non-API types
* David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed
* Noriaki Takatsu (IBM) - [289234][multithread][api] Reset and Restart KeepAliveRequestThread
* David McKnight (IBM) - [282364] [dstore][multithread] timer-threads stay active after disconnect
*******************************************************************************/
package org.eclipse.dstore.core.util;
@ -98,6 +99,9 @@ public abstract class Receiver extends SecuredThread implements IDataStorePrefer
public void finish()
{
_canExit = true;
// one final call here to cleanup parser
handleInput();
}
/**

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2002, 2009 IBM Corporation and others.
* Copyright (c) 2002, 2011 IBM Corporation 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
@ -17,6 +17,7 @@
* David McKnight (IBM) - [278341] [dstore] Disconnect on idle causes the client hang
* Noriaki Takatsu (IBM) - [283656] [dstore][multithread] Serviceability issue
* David McKnight (IBM) - [294933] [dstore] RSE goes into loop
* David McKnight (IBM) - [282364] [dstore][multithread] timer-threads stay active after disconnect
*******************************************************************************/
package org.eclipse.dstore.internal.core.server;
@ -200,6 +201,11 @@ public class ServerCommandHandler extends CommandHandler
*/
public void finish()
{
if (_serverIdleThread != null && _serverIdleThread.isAlive()){
_serverIdleThread._serverTimedOut=true; // ensures that the wait loop won't continue after the interrupt
_serverIdleThread.interrupt();
}
if (_minerLoader != null)
_minerLoader.finishMiners();
super.finish();

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2002, 2010 IBM Corporation and others.
* Copyright (c) 2002, 2011 IBM Corporation 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
@ -21,6 +21,7 @@
* David McKnight (IBM) [307541][dstore] fix for Bug 305218 breaks RDz connections
* David McKnight (IBM) [322407][dstore] Connection dropped automatically when idle
* Noriaki Takatsu (IBM) - [289234][multithread][api] Reset and Restart KeepAliveRequestThread
* David McKnight (IBM) - [282364] [dstore][multithread] timer-threads stay active after disconnect
*******************************************************************************/
package org.eclipse.dstore.internal.core.util;
@ -516,6 +517,16 @@ public class XMLparser
*/
public DataElement parseDocument(BufferedInputStream reader, Socket socket) throws IOException
{
if (!_dataStore.isConnected()){
if (_kart != null && _kart.isAlive()){
_kart.interrupt();
}
if (_initialKart != null && _initialKart.isAlive()){
_initialKart.interrupt();
}
return null;
}
_tagStack.clear();
_objStack.clear();