소스 검색

Fix for poll() in Phy<> with no sockets open. Only affects tcp-proxy.

Adam Ierymenko 10 년 전
부모
커밋
ab720a6f1e
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      osdep/Phy.hpp

+ 1 - 1
osdep/Phy.hpp

@@ -620,7 +620,7 @@ public:
 #endif
 		}
 
-		bool atEnd = false;
+		bool atEnd = _socks.empty();
 		for(typename std::list<PhySocketImpl>::iterator s(_socks.begin()),nexts;(!atEnd);s=nexts) {
 			nexts = s; ++nexts; // we can delete the linked list item, so traverse now
 			atEnd = (nexts == _socks.end()); // if we delete the last element, s!=_socks.end() will no longer terminate our loop