Skip to content

Commit

Permalink
Revert "feat(FleetTelemetryWebSocketService): do not try to connect t…
Browse files Browse the repository at this point in the history
…o fleet telemetry if not licensed"

This reverts commit ddde2e8.
  • Loading branch information
pkuehnel committed Jan 29, 2025
1 parent 4f936db commit f171e3a
Showing 1 changed file with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ public class FleetTelemetryWebSocketService(
IConfigurationWrapper configurationWrapper,
IDateTimeProvider dateTimeProvider,
IServiceProvider serviceProvider,
ISettings settings,
IBackendApiService backendApiService) : IFleetTelemetryWebSocketService
ISettings settings) : IFleetTelemetryWebSocketService
{
private readonly TimeSpan _heartbeatsendTimeout = TimeSpan.FromSeconds(5);

Expand Down Expand Up @@ -53,11 +52,6 @@ public async Task ReconnectWebSocketsForEnabledCars()
&& (c.IsFleetTelemetryHardwareIncompatible == false))
.Select(c => new { c.Vin, IncludeTrackingRelevantFields = c.IncludeTrackingRelevantFields, })
.ToListAsync();
if (cars.Any() && (!await backendApiService.IsBaseAppLicensed(true)))
{
logger.LogWarning("Base App is not licensed, do not connect to Fleet Telemetry");
return;
}
var bytesToSend = Encoding.UTF8.GetBytes("Heartbeat");
foreach (var car in cars)
{
Expand All @@ -66,11 +60,6 @@ public async Task ReconnectWebSocketsForEnabledCars()
continue;
}

if (car.IncludeTrackingRelevantFields && (!await backendApiService.IsFleetApiLicensed(car.Vin, true)))
{
logger.LogWarning("Car {vin} is not licensed for Fleet API, do not connect as IncludeTrackingRelevant fields is enabled", car.Vin);
continue;
}
var existingClient = Clients.FirstOrDefault(c => c.Vin == car.Vin);
if (existingClient != default)
{
Expand Down

0 comments on commit f171e3a

Please sign in to comment.