mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-20 03:24:33 +08:00
Improve performance.
This commit is contained in:
@@ -7,8 +7,12 @@ namespace MQTTnet.Implementations
|
||||
{
|
||||
#if NET452
|
||||
public static Task CompletedTask => Task.FromResult(0);
|
||||
|
||||
public static byte[] EmptyByteArray { get; } = new byte[0];
|
||||
#else
|
||||
public static Task CompletedTask => Task.CompletedTask;
|
||||
|
||||
public static byte[] EmptyByteArray { get; } = Array.Empty<byte>();
|
||||
#endif
|
||||
|
||||
public static void Sleep(TimeSpan timeout)
|
||||
|
||||
Reference in New Issue
Block a user