Skip to content

Commit 7239f03

Browse files
committed
Arreglado bug con el timeout de los switches
1 parent 6c11db3 commit 7239f03

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

Config.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ maxlogs = 20
2121
print-key-pressed = False
2222

2323
[SWITCH]
24-
routing-ttl = 10
24+
routing-ttl = 300
2525

2626
[DEBUG]
2727
show-cable-rectangle = False

Main.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -884,11 +884,12 @@ def update(self):
884884
for child in self.builder.get_object("grid_rclick-disconnect").get_submenu().get_children():
885885
if child.props.label.upper() != "TODOS":
886886
if child.link.uuid not in [x.uuid for x in self.connections]:
887-
print("Object", child.link.__repr__(), "in connections", self.connections)
887+
#print("Object", child.link.__repr__(), "in connections", self.connections)
888888
child.hide()
889889
child.destroy()
890890
else:
891-
print("Object", child.link.__repr__(), "in self.connections", self.connections)
891+
#print("Object", child.link.__repr__(), "in self.connections", self.connections)
892+
pass
892893
pass
893894

894895
objlst.upcon(self)
@@ -1173,7 +1174,7 @@ def __init__(self, x, y, *args, name="Default", maxconnections=5):
11731174
ObjetoBase.__init__(self, x, y, self.objectype, name=name, maxconnections=maxconnections)
11741175
self.x = x
11751176
self.y = y
1176-
self.timeout = 20 #Segundos
1177+
self.timeout = config.getint("SWITCH", "routing-ttl") #Segundos
11771178

11781179
for p in range(self.max_connections):
11791180
Port(self)
@@ -1203,6 +1204,11 @@ def load(self):
12031204
child.show()
12041205

12051206
self.ch = child
1207+
print("Slfto:", self.timeout)
1208+
1209+
def update(self):
1210+
ObjetoBase.update(self)
1211+
self.timeout = config.getint("SWITCH", "routing-ttl")
12061212

12071213

12081214
def connectport(self, objeto):

0 commit comments

Comments
 (0)