Index: source/ariba/SideportListener.cpp
===================================================================
--- source/ariba/SideportListener.cpp	(revision 5803)
+++ source/ariba/SideportListener.cpp	(revision 5838)
@@ -86,10 +86,19 @@
 	if( overlay == NULL ) return false;
 
+	bool relay = false;
+
 	BOOST_FOREACH( LinkDescriptor* link, overlay->links ){
+
+		// is we find a direct connection this is not a relayed node
+		if(link->relay == false && link->remoteNode == node && link->up)
+			return false;
+
+		// if we find a relay conenction this can be a relayed node
+		// but only if we find no direct connection as above
 		if( link->relay && link->remoteNode == node && link->up)
-			return true;
+			relay = true;
 	}
 
-	return false;
+	return relay;
 }
 
Index: source/ariba/overlay/BaseOverlay.cpp
===================================================================
--- source/ariba/overlay/BaseOverlay.cpp	(revision 5803)
+++ source/ariba/overlay/BaseOverlay.cpp	(revision 5838)
@@ -370,5 +370,4 @@
 	}
 
-
 	//ovl.visShowNodeBubble ( ovlId, nodeId, "joining..." );
 	logging_info( "Starting to join spovnet " << id.toString() <<
@@ -399,5 +398,7 @@
 		const LinkID& lnk = bc->establishLink( bootstrapEp );
 		bootstrapLinks.push_back(lnk);
+
 		logging_info("join process initiated for " << id.toString() << "...");
+
 	}
 }
@@ -1107,6 +1108,8 @@
 				state = BaseOverlayStateCompleted;
 				overlayInterface->createOverlay();
-
 				overlayInterface->joinOverlay( replyMsg->getBootstrapEndpoint() );
+
+				//record bootstrap ep as good endpoint to join
+				overlayBootstrap.recordJoin( replyMsg->getBootstrapEndpoint() );
 
 				// update ovlvis
@@ -1555,7 +1558,8 @@
 
 vector<NodeID> BaseOverlay::getOverlayNeighbors(bool deep) const {
+
+	vector<NodeID> nodes = overlayInterface->getKnownNodes(deep);
+
 	// the known nodes _can_ also include our node, so we remove ourself
-	vector<NodeID> nodes = overlayInterface->getKnownNodes(deep);
-
 	vector<NodeID>::iterator i = find( nodes.begin(), nodes.end(), this->nodeId );
 	if( i != nodes.end() ) nodes.erase( i );
Index: source/ariba/overlay/OverlayBootstrap.cpp
===================================================================
--- source/ariba/overlay/OverlayBootstrap.cpp	(revision 5803)
+++ source/ariba/overlay/OverlayBootstrap.cpp	(revision 5838)
@@ -50,5 +50,8 @@
 		spovnetid( SpoVNetID::UNSPECIFIED ),
 		nodeid( NodeID::UNSPECIFIED ),
-		overlay( NULL ){
+		overlay( NULL ),
+		watchtimer(this) {
+
+	srand(time(NULL));
 }
 
@@ -66,4 +69,6 @@
 	manager.registerModule( BootstrapManager::BootstrapTypePeriodicBroadcast );
 	manager.registerModule( BootstrapManager::BootstrapTypeBluetoothSdp );
+
+	watchtimer.startWatchdog();
 }
 
@@ -78,4 +83,6 @@
 	manager.unregisterModule( BootstrapManager::BootstrapTypePeriodicBroadcast );
 	manager.unregisterModule( BootstrapManager::BootstrapTypeBluetoothSdp );
+
+	watchtimer.stopWatchdog();
 }
 
@@ -144,3 +151,67 @@
 }
 
+void OverlayBootstrap::recordJoin(const EndpointDescriptor& _ep){
+	boost::mutex::scoped_lock lock(lastJoinesMutex);
+
+	EventData data;
+	data.spovnetid = spovnetid;
+	data.nodeid = nodeid;
+	data.endpoint = _ep;
+
+	lastJoines.push_front(JoinData(data));
+}
+
+void OverlayBootstrap::checkOverlayStatus(){
+
+	// if we have no overlay neighbors, try to bootstrap using
+	// bootstrap information that we already used
+
+	{	//limit history to 10 endpoints
+		boost::mutex::scoped_lock lock(lastJoinesMutex);
+		while(lastJoines.size() > 10)
+			lastJoines.pop_back();
+	}
+
+	// we have overlay neighbors -> ok
+	if(overlay->getOverlayNeighbors().size() > 0) return;
+
+	// no overlay neighbors -> try out already
+	// successfully used bootstrap nodes
+	JoinData data;
+	{
+		boost::mutex::scoped_lock lock(lastJoinesMutex);
+		JoinStack::iterator i = lastJoines.begin();
+		if(i == lastJoines.end()) return;
+
+		// use last used element and then put it into back
+		JoinData data = *i;
+		lastJoines.pop_front();
+		lastJoines.push_back(data);
+	}
+
+	logging_info("no overlay connections detected, " <<
+					"trying to join using old bootstrap information");
+
+	// try to join using this node, if the join is successfull
+	// the endpoint will again be inserted using recordJoin
+	overlay->joinSpoVNet( spovnetid, data.data.endpoint );
+}
+
+OverlayBootstrap::WatchdogTimer::WatchdogTimer(OverlayBootstrap* _obj) : obj(_obj) {
+}
+
+void OverlayBootstrap::WatchdogTimer::startWatchdog(){
+	Timer::setInterval(2000);
+	Timer::start();
+}
+
+void OverlayBootstrap::WatchdogTimer::stopWatchdog(){
+	Timer::stop();
+}
+
+void OverlayBootstrap::WatchdogTimer::eventFunction(){
+	if(obj == NULL) return;
+	obj->checkOverlayStatus();
+}
+
 }} // namespace ariba, overlay
Index: source/ariba/overlay/OverlayBootstrap.h
===================================================================
--- source/ariba/overlay/OverlayBootstrap.h	(revision 5803)
+++ source/ariba/overlay/OverlayBootstrap.h	(revision 5838)
@@ -42,6 +42,10 @@
 #include <string>
 #include <sstream>
+#include <ctime>
+#include <deque>
+#include <boost/thread/mutex.hpp>
 #include "ariba/utility/logging/Logging.h"
 #include "ariba/utility/types.h"
+#include "ariba/utility/system/Timer.h"
 #include "ariba/utility/bootstrap/BootstrapManager.h"
 #include "ariba/utility/bootstrap/BootstrapInformationCallback.h"
@@ -52,4 +56,5 @@
 #include "ariba/utility/system/SystemEventType.h"
 
+using std::deque;
 using std::string;
 using std::ostringstream;
@@ -62,4 +67,5 @@
 using ariba::utility::SystemEvent;
 using ariba::utility::SystemQueue;
+using ariba::utility::Timer;
 using ariba::utility::SystemEventListener;
 
@@ -81,4 +87,6 @@
 	void revoke();
 
+	void recordJoin(const EndpointDescriptor& _ep);
+
 protected:
 	virtual void handleSystemEvent(const SystemEvent& event);
@@ -86,9 +94,10 @@
 
 private:
-	typedef struct _EventData {
+	class EventData {
+	public:
 		SpoVNetID spovnetid;
 		NodeID nodeid;
 		EndpointDescriptor endpoint;
-	} EventData;
+	};
 
 	BootstrapManager& manager;
@@ -98,4 +107,35 @@
 	string randname;
 
+	class JoinData {
+	public:
+		time_t timestamp;
+		EventData data;
+
+		JoinData(const EventData& _data){
+			timestamp = time(NULL);
+			data = _data;
+		}
+
+		JoinData(){
+			timestamp = time(NULL);
+		}
+	};
+
+	class WatchdogTimer : public Timer {
+	public:
+		WatchdogTimer(OverlayBootstrap* _obj);
+		void startWatchdog();
+		void stopWatchdog();
+	protected:
+		virtual void eventFunction();
+	private:
+		OverlayBootstrap* obj;
+	};
+
+	typedef deque<JoinData> JoinStack;
+	JoinStack lastJoines;
+	boost::mutex lastJoinesMutex;
+	WatchdogTimer watchtimer;
+	void checkOverlayStatus();
 };
 
Index: source/ariba/utility/bootstrap/modules/periodicbroadcast/PeriodicBroadcast.cpp
===================================================================
--- source/ariba/utility/bootstrap/modules/periodicbroadcast/PeriodicBroadcast.cpp	(revision 5803)
+++ source/ariba/utility/bootstrap/modules/periodicbroadcast/PeriodicBroadcast.cpp	(revision 5838)
@@ -58,6 +58,6 @@
 
 use_logging_cpp(PeriodicBroadcast);
-const long PeriodicBroadcast::timerinterval = 2;
-const long PeriodicBroadcast::servicetimeout = 5;
+const long PeriodicBroadcast::timerinterval = 1;
+const long PeriodicBroadcast::servicetimeout = 3;
 const unsigned int PeriodicBroadcast::serverport_v4 = 5634;
 const unsigned int PeriodicBroadcast::serverport_v6 = 5636;
