Index: source/ariba/overlay/BaseOverlay.cpp
===================================================================
--- source/ariba/overlay/BaseOverlay.cpp	(revision 5877)
+++ source/ariba/overlay/BaseOverlay.cpp	(revision 5878)
@@ -116,9 +116,9 @@
 	// search for a descriptor that is already up
 	BOOST_FOREACH( LinkDescriptor* lp, links )
-		if (lp->autolink && lp->remoteNode == node && lp->service == service && lp->up)
+		if (lp->autolink && lp->remoteNode == node && lp->service == service && lp->up && lp->keepAliveMissed == 0)
 			return lp;
 	// if not found, search for one that is about to come up...
 	BOOST_FOREACH( LinkDescriptor* lp, links )
-		if (lp->autolink && lp->remoteNode == node && lp->service == service )
+		if (lp->autolink && lp->remoteNode == node && lp->service == service && lp->keepAliveMissed == 0 )
 			return lp;
 	return NULL;
@@ -154,5 +154,4 @@
 			if (ld->keepAliveMissed > 4) {
 				logging_info( "Link connection request is stale, closing: " << ld );
-				ld->relaying = false;
 				oldlinks.push_back( ld );
 				continue;
@@ -183,5 +182,4 @@
 			if (ld->keepAliveMissed >= 4) {
 				logging_info( "Link is stale, closing: " << ld );
-				ld->relaying = false;
 				oldlinks.push_back( ld );
 				continue;
@@ -192,14 +190,6 @@
 	// drop links
 	BOOST_FOREACH( const LinkDescriptor* ld, oldlinks ) {
-/*
-		vector<LinkID>::iterator it = std::find(
-				bootstrapLinks.begin(), bootstrapLinks.end(), ld->communicationId);
-
-		if (!ld->communicationId.isUnspecified() && it != bootstrapLinks.end() ){
-			logging_info( "Not dropping initiator link: " << ld );
-			continue;
-		}
-*/
 		logging_info( "Link timed out. Dropping " << ld );
+		ld->relaying = false;
 		dropLink( ld->overlayId );
 	}
@@ -402,4 +392,5 @@
 		|| ld->relayed
 		|| !message->isRelayed()
+		|| !message->getService() == OverlayInterface::OVERLAY_SERVICE_ID
 		|| message->getSourceNode()==nodeId ) return;
 
