mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-16 17:23:04 +08:00
Refactoring
This commit is contained in:
@@ -8,6 +8,7 @@ using Microsoft.Extensions.FileProviders;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using MQTTnet.AspnetCore;
|
||||
using MQTTnet.Core;
|
||||
using MQTTnet.Core.Client;
|
||||
|
||||
namespace MQTTnet.TestApp.AspNetCore2
|
||||
{
|
||||
@@ -29,7 +30,7 @@ namespace MQTTnet.TestApp.AspNetCore2
|
||||
|
||||
while (true)
|
||||
{
|
||||
server.Publish(msg.Build());
|
||||
server.PublishAsync(msg.Build()).Wait();
|
||||
await Task.Delay(TimeSpan.FromSeconds(2));
|
||||
msg.WithPayload("Mqtt is still awesome at " + DateTime.Now);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user