Last post Apr 21, 2017 03:35 PM by deepalgorithm
Apr 21, 2017 11:13 AM|yash_9teen|LINK
I am creating a SignalR app which has a Method named as ConnectToServer.
ConnectToServer method makes an PostAsync call to a WebAPI usin HttpClient. The problem is that, whenever this SignalR method makes a call then the OnDisconnect method is called every time just after ConnectToServer finishes. I am wondering why OnDisconnect
is called every time autometically.
Thanks and regards.
Apr 21, 2017 03:35 PM|deepalgorithm|LINK
The OnDisconnected event handler executes at the end of a SignalR connection. So in your case, after "ConnectToServer" finishes - I'm assuming the underlying SignalR connection ends, hence the
OnDisconnected event firing.
The SignalR documentation goes over this in detail.