Explorar el Código

add relayedby check when adding InetClient

Max Ma hace 1 año
padre
commit
4eb5928a96
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      pro/logic/nodes.go

+ 1 - 1
pro/logic/nodes.go

@@ -59,7 +59,7 @@ func ValidateInetGwReq(inetNode models.Node, req models.InetNodeReq, update bool
 			ResetFailedOverPeer(&clientNode)
 		}
 
-		if clientNode.IsRelayed {
+		if clientNode.IsRelayed && clientNode.RelayedBy != inetNode.ID.String() {
 			return fmt.Errorf("node %s is being relayed", clientHost.Name)
 		}