parent
0e70c7950b
commit
b3ac9f4bf8
|
|
@ -1,7 +1,6 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
@ -16,11 +15,8 @@ namespace Microsoft.AspNetCore.SignalR
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (_connections.TryGetValue(connectionId, out var connection))
|
_connections.TryGetValue(connectionId, out var connection);
|
||||||
{
|
return connection;
|
||||||
return connection;
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -38,10 +34,7 @@ namespace Microsoft.AspNetCore.SignalR
|
||||||
|
|
||||||
public IEnumerator<HubConnectionContext> GetEnumerator()
|
public IEnumerator<HubConnectionContext> GetEnumerator()
|
||||||
{
|
{
|
||||||
foreach (var item in _connections)
|
return _connections.Values.GetEnumerator();
|
||||||
{
|
|
||||||
yield return item.Value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
IEnumerator IEnumerable.GetEnumerator()
|
IEnumerator IEnumerable.GetEnumerator()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue