Open hauszerm opened 5 years ago
@hauszerm : Unable to reproduce the issue with latest version of C# device SDK 1.20.0 which was recently released.
Used following code snippet in a standalone application
while (true)
{
using (DeviceClient mydeviceClient = DeviceClient.CreateFromConnectionString(DeviceConnectionString, deviceId, TransportType.Amqp_Tcp_Only))
{
receivedMessage = await mydeviceClient.ReceiveAsync(TimeSpan.MaxValue).ConfigureAwait(false);
if (receivedMessage != null)
{
messageData = Encoding.ASCII.GetString(receivedMessage.GetBytes());
Console.WriteLine("\t{0}> Received message: {1}", DateTime.Now.ToLocalTime(), messageData);
I don't see any NULL messages after 40s - 60 seconds. Are you able to reproduce the issue using a standalone application ?
We have upgraded the protocol gateway After the Upgrade we have an issue with the IothubClient.ReceiveAsync() method.
Code Snippet
We are now receiving NULL messages after 40s - 60s. Before the Update, the ReceiveAsync() delivered a NULL message only in case of an iothub disconnect, not every 40s - 60s. According to the unchanges code in this code snippet, the connection to the iothub will be closed and has to be established once more, a behaviour, which is new since the upgrade the protocol gateway SDK. Do you have any explanation for this behaviour?
best regards Michael