Exlicitly drop packet router when shutdown detected
In the vpn client I've observed that 2 out of 3 times the disconnect procedure stalls out. Investigating in the logs these 5 are still running when we hit shutdown timeout. [TaskClient-nym_vpn_lib-mixnet_client_main-real_traffic_controller-ack_control-retransmission_request_listener] Polling shutdown failed: channel closed [TaskClient-nym_vpn_lib-mixnet_client_main-real_traffic_controller-out_queue_control] Polling shutdown failed: channel closed [TaskClient-gateway-packet-router] Polling shutdown failed: channel closed [TaskClient-nym_vpn_lib-mixnet_client_main-gateway_transceiver] Polling shutdown failed: channel closed [TaskClient-nym_vpn_lib-mixnet_client_main-mix_traffic_controller] Polling shutdown failed: channel closed I _think_ what was causing the problem here is that the task client in the packet router is not being awaited in an event loop like other client instances. Explictly drop it in the socket state to make sure it's not blocking shutdown.
This commit is contained in:
@@ -158,6 +158,9 @@ impl PartiallyDelegated {
|
||||
_ = shutdown.recv() => {
|
||||
log::trace!("GatewayClient listener: Received shutdown");
|
||||
log::debug!("GatewayClient listener: Exiting");
|
||||
// The packet router a task client, and as such we need to make
|
||||
// sure it's dropped to not stall the shutdown process.
|
||||
drop(packet_router);
|
||||
return;
|
||||
}
|
||||
_ = &mut notify_receiver => {
|
||||
|
||||
Reference in New Issue
Block a user