summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/gui/statemachines.py
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-10-04 12:09:58 -0300
committerTomás Touceda <chiiph@leap.se>2013-10-04 12:09:58 -0300
commit584866689560bd2ebea01ecc5e6ae5e79ce7fc81 (patch)
tree4fe300c3c105e17721f79eeece9bbd3745b43d78 /src/leap/bitmask/gui/statemachines.py
parent1f0f8efc4cb985c082b3b8fe7b3dc45aed047a47 (diff)
parent759d73ae0728f074e0fb0740269249d0e5066574 (diff)
Merge branch 'release-0.3.4'0.3.4
Diffstat (limited to 'src/leap/bitmask/gui/statemachines.py')
-rw-r--r--src/leap/bitmask/gui/statemachines.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/leap/bitmask/gui/statemachines.py b/src/leap/bitmask/gui/statemachines.py
index c3dd5ed3..94726720 100644
--- a/src/leap/bitmask/gui/statemachines.py
+++ b/src/leap/bitmask/gui/statemachines.py
@@ -128,11 +128,25 @@ class ConnectionMachineBuilder(object):
states[_OFF])
# * If we receive the connection_died, we transition
- # to the off state
+ # from on directly to the off state
states[_ON].addTransition(
conn.qtsigs.connection_died_signal,
states[_OFF])
+ # * If we receive the connection_aborted, we transition
+ # from connecting to the off state
+ states[_CON].addTransition(
+ conn.qtsigs.connection_aborted_signal,
+ states[_OFF])
+ # * Connection died can in some cases also be
+ # triggered while we are in CONNECTING
+ # state. I should be avoided, since connection_aborted
+ # is clearer (and reserve connection_died
+ # for transitions from on->off
+ states[_CON].addTransition(
+ conn.qtsigs.connection_died_signal,
+ states[_OFF])
+
# adding states to the machine
for state in states.itervalues():
machine.addState(state)