Procházet zdrojové kódy

Start a dedicated thread per client.

release/3.x.x
Christian před 6 roky
rodič
revize
febc8f774d
2 změnil soubory, kde provedl 6 přidání a 4 odebrání
  1. +4
    -2
      Frameworks/MQTTnet.NetStandard/Server/MqttServer.cs
  2. +2
    -2
      Frameworks/MQTTnet.Netstandard/MQTTnet.NetStandard.csproj

+ 4
- 2
Frameworks/MQTTnet.NetStandard/Server/MqttServer.cs Zobrazit soubor

@@ -156,9 +156,11 @@ namespace MQTTnet.Server

private void OnClientAccepted(object sender, MqttServerAdapterClientAcceptedEventArgs eventArgs)
{
eventArgs.SessionTask = Task.Run(
eventArgs.SessionTask = Task.Factory.StartNew(
() => _clientSessionsManager.RunSessionAsync(eventArgs.Client, _cancellationTokenSource.Token),
_cancellationTokenSource.Token);
_cancellationTokenSource.Token,
TaskCreationOptions.LongRunning,
TaskScheduler.Current);
}
}
}

+ 2
- 2
Frameworks/MQTTnet.Netstandard/MQTTnet.NetStandard.csproj Zobrazit soubor

@@ -22,7 +22,7 @@
<CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
<NugetTargetMoniker>UAP,Version=v10.0</NugetTargetMoniker>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.16299.0</TargetPlatformVersion>
<TargetPlatformVersion>10.0.17134.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
<TargetFrameworkIdentifier>.NETCore</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
@@ -56,7 +56,7 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='uap10.0'">
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.0.8" />
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.1.4" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='net452'">


Načítá se…
Zrušit
Uložit