You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SDK version used: 1.42.2 (but also inspected the source of the latest main commit)
Description of the issue
The bug is almost exactly the same as described in #3201, but for me it happened with SendEventBatchAsync.
Sending a message to multiple outputs, or multiple times throws the following exception: An item with the same key has already been added. Key: iothub-outputname
Looking at the source it seems that the fix (using the indexer to set the property) for #3201 was only applied to the SendEventAsync method. The method SendEventBatchAsync still uses .Add() and throws.
Would be great to fix it there too, I'm currently using reflection to remove the key before I call the ModuleClient - which is obviously not very pretty :-/
Thanks in advance
The text was updated successfully, but these errors were encountered:
…et (#3441)
#3434
The method ```Add``` on a dictionary throws if the key is already present. This change will overwrite any previously set output name without throwing.
Context
Context is very likely irrelevant
Description of the issue
The bug is almost exactly the same as described in #3201, but for me it happened with
SendEventBatchAsync
.Sending a message to multiple outputs, or multiple times throws the following exception:
An item with the same key has already been added. Key: iothub-outputname
Looking at the source it seems that the fix (using the indexer to set the property) for #3201 was only applied to the
SendEventAsync
method. The methodSendEventBatchAsync
still uses.Add()
and throws.azure-iot-sdk-csharp/iothub/device/src/InternalClient.cs
Line 1573 in 9e445ce
Would be great to fix it there too, I'm currently using reflection to remove the key before I call the ModuleClient - which is obviously not very pretty :-/
Thanks in advance
The text was updated successfully, but these errors were encountered: