Procházet zdrojové kódy

move sourceAddress out of scope

sourceAddress is used in the catch block
Moritz Warning před 9 roky
rodič
revize
b3073f44a2
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      node/IncomingPacket.cpp

+ 2 - 2
node/IncomingPacket.cpp

@@ -42,9 +42,9 @@ namespace ZeroTier {
 
 bool IncomingPacket::tryDecode(const RuntimeEnvironment *RR,bool deferred)
 {
-	try {
-		const Address sourceAddress(source());
+	const Address sourceAddress(source());
 
+	try {
 		// Check for trusted paths or unencrypted HELLOs (HELLO is the only packet sent in the clear)
 		const unsigned int c = cipher();
 		bool trusted = false;