Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make access to the state thread safe.

  • Loading branch information...
commit 8464514a8dab4a02d6134f4d94caf390d6fcb846 1 parent 50ee2b9
@davidfowl davidfowl authored
Showing with 10 additions and 4 deletions.
  1. +10 −4 SignalR.Client/Hubs/HubProxy.cs
View
14 SignalR.Client/Hubs/HubProxy.cs
@@ -30,13 +30,19 @@ public HubProxy(IConnection connection, string hubName)
{
get
{
- JToken value;
- _state.TryGetValue(name, out value);
- return value;
+ lock (_state)
+ {
+ JToken value;
+ _state.TryGetValue(name, out value);
+ return value;
+ }
}
set
{
- _state[name] = value;
+ lock (_state)
+ {
+ _state[name] = value;
+ }
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.