Update: SignalR AddToGroups at Query String
Use OnConnection query string to add group membership rather than making an additional call after connection.
This commit is contained in:
@@ -357,12 +357,10 @@
|
||||
vm.isotopeInited = true;
|
||||
|
||||
// Init Persistent Connection
|
||||
liveConnection = $.connection('@(Url.Content("~/API/Logging/Notifications"))');
|
||||
liveConnection = $.connection('@(Url.Content("~/API/Logging/Notifications"))', { addToGroups: '@(Disco.BI.DeviceBI.EnrolmentLog.Current.LiveLogGroupName)' });
|
||||
liveConnection.received(parseLog);
|
||||
liveConnection.error(function (e) { if (e.status != 200) alert('Live-Log Error: ' + e.statusText + ': ' + e.responseText); });
|
||||
liveConnection.start(function () {
|
||||
liveConnection.send('/addToGroups:@(Disco.BI.DeviceBI.EnrolmentLog.Current.LiveLogGroupName)');
|
||||
});
|
||||
liveConnection.start();
|
||||
}
|
||||
init();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user