Skip to content

Commit

Permalink
Fix for issue#5171 (#5175)
Browse files Browse the repository at this point in the history
  • Loading branch information
HongGit authored Jul 5, 2023
1 parent f424f6f commit 20d48fc
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -351,11 +351,6 @@ public TChannel CreateChannel<TChannel>(EndpointAddress address, Uri via)
}

serviceChannel.ClientRuntime.GetRuntime().InitializeChannel(clientChannel);
OperationContext current = OperationContext.Current;
if ((current != null) && (current.InstanceContext != null))
{
current.InstanceContext.WmiChannels.Add((IChannel)serviceChannel.Proxy);
}

return (TChannel)serviceChannel.Proxy;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public sealed class InstanceContext : CommunicationObject, IExtensibleObject<Ins
private SynchronizationContext _synchronizationContext;
private object _userObject;
private bool _wellKnown;
private SynchronizedCollection<IChannel> _wmiChannels;
private bool _isUserCreated;

public InstanceContext(object implementation)
Expand Down Expand Up @@ -149,24 +148,6 @@ internal object UserObject
get { return _userObject; }
}

internal ICollection<IChannel> WmiChannels
{
get
{
if (_wmiChannels == null)
{
lock (ThisLock)
{
if (_wmiChannels == null)
{
_wmiChannels = new SynchronizedCollection<IChannel>();
}
}
}
return _wmiChannels;
}
}

protected override void OnAbort()
{
_channels.Abort();
Expand Down

0 comments on commit 20d48fc

Please sign in to comment.