Skip to content

Commit 6493908

Browse files
Fixed issue with adding a Device that already exists in the Agent
1 parent cb12bbd commit 6493908

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

libraries/MTConnect.NET-Common/Agents/MTConnectAgent.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1462,6 +1462,7 @@ public IDevice AddDevice(IDevice device, bool initializeDataItems = true)
14621462
}
14631463

14641464
// Add the Device to the Buffer
1465+
_devices.TryRemove(obj.Uuid, out _);
14651466
var success = _devices.TryAdd(obj.Uuid, obj);
14661467
if (success)
14671468
{

0 commit comments

Comments
 (0)