Răsfoiți Sursa

Fix infinite loop typo.

Adam Ierymenko 10 ani în urmă
părinte
comite
fadb291962
1 a modificat fișierele cu 6 adăugiri și 4 ștergeri
  1. 6 4
      node/SelfAwareness.hpp

+ 6 - 4
node/SelfAwareness.hpp

@@ -72,10 +72,12 @@ public:
 	inline std::vector< std::pair<Address,InetAddress> > getReportedSurface() const
 	{
 		std::vector< std::pair<Address,InetAddress> > r;
-		Mutex::Lock _l(_phy_m);
-		r.reserve(_phy.size());
-		for(std::map< PhySurfaceKey,PhySurfaceEntry >::const_iterator p(_phy.begin());p!=_phy.end();)
-			r.push_back(std::pair<Address,InetAddress>(p->first.reporter,p->second.mySurface));
+		{
+			Mutex::Lock _l(_phy_m);
+			r.reserve(_phy.size());
+			for(std::map< PhySurfaceKey,PhySurfaceEntry >::const_iterator p(_phy.begin());p!=_phy.end();++p)
+				r.push_back(std::pair<Address,InetAddress>(p->first.reporter,p->second.mySurface));
+		}
 		return r;
 	}