mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-17 01:33:03 +08:00
Fix issues in RPC extension.
This commit is contained in:
@@ -350,14 +350,11 @@ namespace MQTTnet.TestApp.UniversalWindows
|
||||
payload = Convert.FromBase64String(RpcPayload.Text);
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
var rpcClient = new MqttRpcClient(_mqttClient);
|
||||
await rpcClient.EnableAsync();
|
||||
var response = await rpcClient.ExecuteAsync(TimeSpan.FromSeconds(5), RpcMethod.Text, payload, qos);
|
||||
await rpcClient.DisableAsync();
|
||||
|
||||
|
||||
RpcResponses.Items.Add(RpcMethod.Text + " >>> " + Encoding.UTF8.GetString(response));
|
||||
}
|
||||
catch (MqttCommunicationTimedOutException)
|
||||
|
||||
Reference in New Issue
Block a user