Last post Dec 12, 2013 04:22 PM by damienBod
Dec 11, 2013 02:43 AM|Binu Bhasuran|LINK
i'm working on a chat applciation which uses SignalR, here is what i did.
But i'm facing following problem during an active chat session, If i lose connection in between and in mean time if i try to send some message it crashes ( eg. it is in Reconnecting state).
How do i queue my messages when its reconnecting?, is there any way i can make that thread wait till it successfully establishes connection.
Thanks in advance.
Dec 12, 2013 04:22 PM|damienBod|LINK
Check the state of the Hub. Use this then to buffer your messages or whatever
if (myHubClient.State == ConnectionState.Connected)
myHubClient.AddMessage("damien client", "hello all");
HubClientEvents.Log.Warning("Can't send message, connectionState= " + myHubClient.State);