Example #1
0
        //Note: no implementation of publish methods as it is done via the hub context...

        public override Task OnDisconnected(bool stopCalled)
        {
            try
            {
                var connectionEvent = CreateConnectionEvent("Disconnected");
                bus.Publish(connectionEvent);

                brokerConnectionManager.RemoveConnection(Context.ConnectionId);
            }
            catch (Exception exception)
            {
                Console.WriteLine("There has been an exception: {0}", exception);
                throw;
            }
            return(base.OnDisconnected(stopCalled));
        }
Example #2
0
        //Note: no implementation of publish methods as it is done via the hub context...

        public override Task OnDisconnected(bool stopCalled)
        {
            try
            {
                var connectionEvent = CreateConnectionEvent("Disconnected");
                bus.Publish(connectionEvent);

                brokerConnectionManager.RemoveConnection(Context.ConnectionId);
            }
            catch (Exception exception)
            {
                messagingLogger.ErrorFormat(this, "There has been an exception: {0}", exception);
                throw;
            }
            return(base.OnDisconnected(stopCalled));
        }