소스 검색

Potential fix fro deadlock bug

Joseph Henry 4 년 전
부모
커밋
165757176a
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      node/Peer.cpp

+ 1 - 1
node/Peer.cpp

@@ -228,9 +228,9 @@ void Peer::received(
 
 SharedPtr<Path> Peer::getAppropriatePath(int64_t now, bool includeExpired, int32_t flowId)
 {
+	Mutex::Lock _l(_paths_m);
 	Mutex::Lock _l(_bond_m);
 	if (!_bond) {
-		Mutex::Lock _l(_paths_m);
 		unsigned int bestPath = ZT_MAX_PEER_NETWORK_PATHS;
 		/**
 		 * Send traffic across the highest quality path only. This algorithm will still