diff options
author | Tomás Touceda <chiiph@leap.se> | 2013-09-30 14:33:25 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2013-09-30 14:33:25 -0300 |
commit | 66c486a534b5ecd2178e096bea3b300971f59b5b (patch) | |
tree | dcb1a8aac952f28bd848373d87e7189fcecaed6e /src/leap/bitmask/gui/statemachines.py | |
parent | 4a4c9b91a8b62729e14c68ff99a51ca8f50cc3b3 (diff) | |
parent | 24c91beb6f7102158a37330e914e19570bb85ecf (diff) |
Merge remote-tracking branch 'kali/bug/connection_aborted' into develop
Diffstat (limited to 'src/leap/bitmask/gui/statemachines.py')
-rw-r--r-- | src/leap/bitmask/gui/statemachines.py | 16 |
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) |