internal void TunnelTimeout(Tunnel tunnel) { ClientDestination client = FindClient(tunnel); if (client == null) { return; } var replace = FindReplaceRecord(tunnel); if (replace != null) { DebugUtils.LogDebug("ClientTunnelProvider: TunnelTimeout: Failed replacing " + replace.OldTunnel.ToString() + " with " + tunnel.ToString()); /* * if ( replace.OldTunnel.Expired ) * { * DebugUtils.LogDebug( "ClientTunnelProvider: TunnelTimeout: Old tunnel expired. " + replace.OldTunnel.ToString() ); * * client.RemovePoolTunnel( replace.OldTunnel ); * }*/ ReplaceTunnel(tunnel, client, replace); } client.RemoveTunnel(tunnel); }
internal void TunnelBuildTimeout(Tunnel tunnel) { ClientDestination client = FindClient(tunnel); if (client == null) { return; } client.RemoveTunnel(tunnel); lock ( Destinations ) { Destinations.Remove(tunnel); } var replace = FindReplaceRecord(tunnel); if (replace != null) { DebugUtils.LogDebug("ClientTunnelProvider: TunnelBuildTimeout: Failed replacing " + replace.OldTunnel.ToString() + " with " + tunnel.ToString()); if (replace.OldTunnel.Expired) { DebugUtils.LogDebug("ClientTunnelProvider: TunnelBuildTimeout: Old tunnel expired. " + replace.OldTunnel.ToString()); client.RemoveTunnel(replace.OldTunnel); } tunnel.Shutdown(); ReplaceTunnel(tunnel, client, replace); } else { /* #if DEBUG * DebugUtils.LogDebug( "ClientTunnelProvider: TunnelBuildTimeout: Unable to find a matching tunnel under replacement for " + * tunnel.ToString() ); #endif */ } }
internal void TunnelBuildTimeout(Tunnel tunnel) { ClientDestination client = FindClient(tunnel); if (client == null) { return; } client.RemoveTunnel(tunnel); lock ( Destinations ) { Destinations.Remove(tunnel); } var replace = FindReplaceRecord(tunnel); if (replace != null) { Logging.LogDebug($"ClientTunnelProvider: TunnelBuildTimeout: " + $"Failed replacing {replace.OldTunnel} with {tunnel}"); if (replace.OldTunnel.Expired) { Logging.LogDebug($"ClientTunnelProvider: TunnelBuildTimeout: " + $"Old tunnel expired. {replace.OldTunnel}"); client.RemoveTunnel(replace.OldTunnel); } tunnel.Shutdown(); ReplaceTunnel(tunnel, client, replace); } else { /* * Logging.LogDebug( $"ClientTunnelProvider: TunnelBuildTimeout: " + * $"Unable to find a matching tunnel under replacement for {tunnel}" ); */ } }