File tree 1 file changed +8
-5
lines changed
talpid-wireguard/src/wireguard_go
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -106,17 +106,17 @@ impl WgGoTunnel {
106
106
}
107
107
}
108
108
109
- pub fn set_config ( mut self , config : & Config ) -> Result < Self > {
110
- let connectivity_checker = self
111
- . take_checker ( )
112
- . expect ( "connectivity checker unexpectedly dropped" ) ;
109
+ pub fn set_config ( self , config : & Config ) -> Result < Self > {
113
110
let state = self . as_state ( ) ;
114
111
let log_path = state. _logging_context . path . clone ( ) ;
115
112
let tun_provider = Arc :: clone ( & state. tun_provider ) ;
116
113
let routes = config. get_tunnel_destinations ( ) ;
117
114
118
115
match self {
119
- WgGoTunnel :: Multihop ( state) if !config. is_multihop ( ) => {
116
+ WgGoTunnel :: Multihop ( mut state) if !config. is_multihop ( ) => {
117
+ let connectivity_checker = self
118
+ . take_checker ( )
119
+ . expect ( "connectivity checker unexpectedly dropped" ) ;
120
120
state. stop ( ) ?;
121
121
Self :: start_tunnel (
122
122
config,
@@ -127,6 +127,9 @@ impl WgGoTunnel {
127
127
)
128
128
}
129
129
WgGoTunnel :: Singlehop ( state) if config. is_multihop ( ) => {
130
+ let connectivity_checker = self
131
+ . take_checker ( )
132
+ . expect ( "connectivity checker unexpectedly dropped" ) ;
130
133
state. stop ( ) ?;
131
134
Self :: start_multihop_tunnel (
132
135
config,
You can’t perform that action at this time.
0 commit comments