Skip to content

Commit 988b88c

Browse files
gandalfliangmattqs
authored andcommitted
update Managers when new instance added (#182)
fix for not updating Managers when new instance added
1 parent 2506dd5 commit 988b88c

File tree

1 file changed

+2
-2
lines changed
  • Src/SocketIoClientDotNet/Client

1 file changed

+2
-2
lines changed

Src/SocketIoClientDotNet/Client/IO.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace Quobject.SocketIoClientDotNet.Client
66
{
77
public class IO
88
{
9-
private static readonly ImmutableDictionary<string, Manager> Managers = ImmutableDictionary.Create<string, Manager>();
9+
private static ImmutableDictionary<string, Manager> Managers = ImmutableDictionary.Create<string, Manager>();
1010

1111
/// <summary>
1212
/// Protocol version
@@ -55,7 +55,7 @@ public static Socket Socket(Uri uri, Options opts)
5555
if (!Managers.ContainsKey(id))
5656
{
5757
log.Info( string.Format("new io instance for {0}", id));
58-
Managers.Add(id, new Manager(uri, opts));
58+
Managers = Managers.Add(id, new Manager(uri, opts));
5959

6060
}
6161
io = Managers[id];

0 commit comments

Comments
 (0)