@@ -73,7 +73,7 @@ impl AutoContext {
7373/// # Errors
7474///
7575/// Returns error if the connection setup fails non-retryably.
76- // REASON: threading metrics, peers, routes, route_updates_tx, directive_sink , node_state through mode dispatch
76+ // REASON: threading metrics, peers, routes, route_updates_tx, command_sink , node_state through mode dispatch
7777#[ allow( clippy:: too_many_arguments) ]
7878pub ( crate ) async fn run (
7979 global : & GlobalConfig ,
@@ -82,7 +82,7 @@ pub(crate) async fn run(
8282 peers : Arc < Registry > ,
8383 routes : SharedRouteTable ,
8484 route_updates_tx : tokio:: sync:: broadcast:: Sender < RouteUpdate > ,
85- directive_sink : tokio:: sync:: mpsc:: Receiver < wallhack_core:: control:: handler:: NodeCommand > ,
85+ command_sink : tokio:: sync:: mpsc:: Receiver < wallhack_core:: control:: handler:: NodeCommand > ,
8686 node_state : SharedNodeState ,
8787) -> Result < ( ) , NodeError > {
8888 let tun_capable = detect_tun_capable ( ) ;
@@ -144,13 +144,13 @@ pub(crate) async fn run(
144144 }
145145 ( Some ( connect) , None ) => {
146146 // Connector-only path: run the connector as a task and poll
147- // directive_sink for dynamic listen/disconnect commands.
148- run_auto_connector_with_commands ( Arc :: clone ( & ctx) , connect, directive_sink ) . await
147+ // command_sink for dynamic listen/disconnect commands.
148+ run_auto_connector_with_commands ( Arc :: clone ( & ctx) , connect, command_sink ) . await
149149 }
150150 ( None , Some ( listen) ) => {
151151 // Listener-only path: run the listener as a task and poll
152- // directive_sink for dynamic connect/disconnect commands.
153- run_auto_listener_with_commands ( Arc :: clone ( & ctx) , listen, directive_sink ) . await
152+ // command_sink for dynamic connect/disconnect commands.
153+ run_auto_listener_with_commands ( Arc :: clone ( & ctx) , listen, command_sink ) . await
154154 }
155155 ( None , None ) => Err ( NodeError :: Config (
156156 "auto mode requires a connect or listen address" . into ( ) ,
@@ -160,15 +160,15 @@ pub(crate) async fn run(
160160
161161/// Connector-only path with command integration.
162162///
163- /// Spawns the connector as a task, then polls `directive_sink ` for dynamic
163+ /// Spawns the connector as a task, then polls `command_sink ` for dynamic
164164/// commands. `Listen` commands start a listener task alongside the
165165/// connector. `Disconnect` commands abort the active connector.
166166// REASON: too_many_lines: symmetric listen/connect/disconnect command arms with distinct spawn logic
167167#[ allow( clippy:: too_many_lines) ]
168168async fn run_auto_connector_with_commands (
169169 ctx : Arc < AutoContext > ,
170170 connect : & AddressSpec ,
171- mut directive_sink : tokio:: sync:: mpsc:: Receiver < wallhack_core:: control:: handler:: NodeCommand > ,
171+ mut command_sink : tokio:: sync:: mpsc:: Receiver < wallhack_core:: control:: handler:: NodeCommand > ,
172172) -> Result < ( ) , NodeError > {
173173 use wallhack_core:: { control:: handler:: NodeCommand , node_api:: NodeApiError } ;
174174
@@ -203,7 +203,7 @@ async fn run_auto_connector_with_commands(
203203 }
204204 return result?;
205205 }
206- Some ( cmd) = directive_sink . recv( ) => {
206+ Some ( cmd) = command_sink . recv( ) => {
207207 match cmd {
208208 NodeCommand :: Role { .. } => {
209209 // Role changes not yet handled in connector path.
@@ -248,15 +248,15 @@ async fn run_auto_connector_with_commands(
248248
249249/// Listener-only path with command integration.
250250///
251- /// Spawns the listener as a task, then polls `directive_sink ` for dynamic
251+ /// Spawns the listener as a task, then polls `command_sink ` for dynamic
252252/// commands. `Connect` commands spawn a connector task alongside the
253253/// listener. `Disconnect` commands abort the active connector.
254254// REASON: too_many_lines: symmetric connect/listen/disconnect command arms with distinct spawn logic
255255#[ allow( clippy:: too_many_lines) ]
256256async fn run_auto_listener_with_commands (
257257 ctx : Arc < AutoContext > ,
258258 listen : & AddressSpec ,
259- mut directive_sink : tokio:: sync:: mpsc:: Receiver < wallhack_core:: control:: handler:: NodeCommand > ,
259+ mut command_sink : tokio:: sync:: mpsc:: Receiver < wallhack_core:: control:: handler:: NodeCommand > ,
260260) -> Result < ( ) , NodeError > {
261261 use wallhack_core:: { control:: handler:: NodeCommand , node_api:: NodeApiError } ;
262262
@@ -291,7 +291,7 @@ async fn run_auto_listener_with_commands(
291291 }
292292 return result?;
293293 }
294- Some ( cmd) = directive_sink . recv( ) => {
294+ Some ( cmd) = command_sink . recv( ) => {
295295 match cmd {
296296 NodeCommand :: Role { .. } => {
297297 // Role changes not yet handled in listener path.
0 commit comments