Improve performance.

This commit is contained in:
Christian Kratky
2020-11-13 20:33:47 +01:00
parent cc405c3e90
commit d0a848c8b4
18 changed files with 201 additions and 171 deletions
@@ -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)