diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2018-08-30 14:38:40 -0300 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2018-09-03 08:05:18 -0300 |
| commit | a4add0ecce0b7105c2eb6c9af738ba91aaafe86f (patch) | |
| tree | 9267173e475bf28d88937a00fd4eeeab69f97086 /talpid-core/src | |
| parent | 7663c2ea549dff8fdf210c41f95a373b4bdedd9b (diff) | |
| download | mullvadvpn-a4add0ecce0b7105c2eb6c9af738ba91aaafe86f.tar.xz mullvadvpn-a4add0ecce0b7105c2eb6c9af738ba91aaafe86f.zip | |
Add reason to transition to blocked state
Diffstat (limited to 'talpid-core/src')
| -rw-r--r-- | talpid-core/src/tunnel_state_machine/blocked_state.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/talpid-core/src/tunnel_state_machine/blocked_state.rs b/talpid-core/src/tunnel_state_machine/blocked_state.rs index f4499c7b58..f63326b800 100644 --- a/talpid-core/src/tunnel_state_machine/blocked_state.rs +++ b/talpid-core/src/tunnel_state_machine/blocked_state.rs @@ -1,6 +1,8 @@ use futures::sync::mpsc; use futures::Stream; +use talpid_types::tunnel::BlockReason; + use super::{ ConnectingState, DisconnectedState, EventConsequence, SharedTunnelStateValues, TunnelCommand, TunnelState, TunnelStateTransition, TunnelStateWrapper, @@ -10,15 +12,15 @@ use super::{ pub struct BlockedState; impl TunnelState for BlockedState { - type Bootstrap = (); + type Bootstrap = BlockReason; fn enter( _: &mut SharedTunnelStateValues, - _: Self::Bootstrap, + block_reason: Self::Bootstrap, ) -> (TunnelStateWrapper, TunnelStateTransition) { ( TunnelStateWrapper::from(BlockedState), - TunnelStateTransition::Blocked, + TunnelStateTransition::Blocked(block_reason), ) } |
