1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-16 05:25:21 +02:00

[390681] [dstore] need to merge differences between HEAD stream and 3.2 in ConnectionEstablisher.finished()

This commit is contained in:
David McKnight 2012-09-28 14:19:14 +00:00
parent 1fee07d782
commit b152672e22
2 changed files with 27 additions and 3 deletions

View file

@ -214,7 +214,7 @@ public abstract class UpdateHandler extends Handler
}
}
if (_dataStore != null && !_dataStore.isVirtual() && isStatus){
_dataStore.disconnectObjects(object.getParent()); // spirit the command
_dataStore.disconnectObjects(object); // spirit the status
}
}

View file

@ -30,6 +30,7 @@
* David McKnight (IBM) - [371401] [dstore][multithread] avoid use of static variables - causes memory leak after disconnect
* David McKnight (IBM) - [378136] [dstore] miner.finish is stuck
* David McKnight (IBM) - [388472] [dstore] need alternative option for getting at server hostname
* David McKnight (IBM) - [390681] [dstore] need to merge differences between HEAD stream and 3.2 in ConnectionEstablisher.finished()
*******************************************************************************/
package org.eclipse.dstore.core.server;
@ -212,22 +213,44 @@ public class ConnectionEstablisher
return _msg;
}
/**
* Tells the connection establisher to clean up and shutdown
*/
/**
* Tells the connection establisher to clean up and shutdown
*/
public void finished(ServerReceiver receiver)
{
{
if (_dataStore.getClient() != null) {
_dataStore.getClient().getLogger().logInfo(this.getClass().toString(), "ConnectionEstablisher.finished()"); //$NON-NLS-1$
}
if (_dataStore.getClient() != null) {
_dataStore.getClient().getLogger().logInfo(this.getClass().toString(), "ConnectionEstablisher - removing sender"); //$NON-NLS-1$
}
_updateHandler.removeSenderWith(receiver.socket());
if (_dataStore.getClient() != null) {
_dataStore.getClient().getLogger().logInfo(this.getClass().toString(), "ConnectionEstablisher - removing receiver"); //$NON-NLS-1$
}
_receivers.remove(receiver);
if (_dataStore.getClient() != null) {
_dataStore.getClient().getLogger().logInfo(this.getClass().toString(), "ConnectionEstablisher - removing preference listener"); //$NON-NLS-1$
}
_dataStore.removeDataStorePreferenceListener(receiver);
//if (_receivers.size() == 0)
{
_continue = false;
_commandHandler.finish();
_commandHandler.finish();
if (_dataStore.getClient() != null) {
_dataStore.getClient().getLogger().logInfo(this.getClass().toString(), "ConnectionEstablisher - finishing update handler"); //$NON-NLS-1$
}
_updateHandler.finish();
if (_dataStore.getClient() != null) {
_dataStore.getClient().getLogger().logInfo(this.getClass().toString(), "ConnectionEstablisher - finishing DataStore"); //$NON-NLS-1$
}
_dataStore.finish();
System.out.println(ServerReturnCodes.RC_FINISHED);
@ -236,6 +259,7 @@ public class ConnectionEstablisher
}
}
private void waitForConnections()
{
while (_continue == true)