Skip to content

2.1.0

Compare
Choose a tag to compare
@DamianEdwards DamianEdwards released this 13 Jun 17:39
· 281 commits to release since this release

Bugs Fixed

  • Make HubCallerContext easier to mock for unit testing a Hub (#3012)
  • SignalR perf counter Connections Reconnected doesn't increase after connection reconnected (#3004)
  • Change when connection connect events/methods are raised (#2997)
  • Remove the reconnect message broadcast intended to suppress disconnect events on other servers in scale-out (#2996)
  • .NET Client Not Compatible With Windows Phone 8.1 (#2968)
  • JavaScript call to refresh update panel inside the hub client method fails and logs the error "TypeError: access to strict mode caller function is censored" in the error console. (#2964)
  • SqlScaleout: Sql server runs out of worker threads (#2958)
  • Fix for issue 'Allow for overriding JS json deserializing function' (#1564) does not work in IE9. (#2945)
  • Server Sent Events: Connection.eventSource is undefined on reconnect (#2925)
  • Error performance counters get incremented twice for each invocation of a missing method. (#2859)
  • signalr/hubs should throw an exception with an invalid hub name (#2705)
  • SignalR v2.0.0-rc1 - get state variable in hub from vb is not working (#2620)

Features

Breaking Changes

OnDisconnect server event semantic change

We've changed what happens when a connection is detected as "gone" on the server. In the past, we made efforts to ensure the server-side disconnect events were raised only once, even if a logical connection had actually been alive on more than one server during its life (in the case of a web farm). This involved sending messages between web nodes in the farm which could lead to undue strain on the backplane, especially when the long polling transport was in use (see #2958).

From this version on, the event will always be raised on any server that has seen a connection and then detects it has gone. We've added a new overload (#2998) so that you can handle the cases when the connection stops due to timeout (like if it moves to another server, or loses network connectivity) or due to the stop method being called on the client (aka a graceful close, e.g. when the user closes the browser).

Be sure to factor this change of behavior into your application design.

IHubConnectionContext changed to IHubConnectionContext<T>

To support the new strongly typed client Hubs (#2449) the interfaces IHubConnectionContext and IHubCallerConnectionContext had to be made generic. To continue using these types with a dynamic client method contract, as in previous versions, just specify the generic type argument as dynamic, e.g.

IHubConnectionContext<dynamic> context = GlobalHost.ConnectionManager.GetHubContext<MyHub>();