SignalR/SignalR — Issue #39: Sends being blocked
Author: davideweaver
Created: 2011-10-09 19:18:23+00:00
State: open

I have the simple, non-hub chat client (from hanselman's blog post) which works (http://www.mysite.com/echo). From another web server I have VB.Net code that is also sending messages to the chat server like (using the Signalr client):

Public Sub SendMessage(msg As String)
Dim connection As New Connection("http://www.mysitecom/echo")
connection.Start().Wait()
connection.Send(msg)
End Sub

So, on one of the chat clients I type "test" and click send. It will echo back to me. Then I call the above code from the other server a few times and nothing appears in my chat client. I then type 'test2' in the chat client and It echos back to me 'test2' plus all the messages I sent from the other server. Here is my chat server code:

Public Class UsersConnection
Inherits PersistentConnection
Protected Overrides Function OnReceivedAsync(clientId As String, data As String) As System.Threading.Tasks.Task
Logging.NewEvent() _
.Text("OnReceivedAsync: '{0}', '{1}'", clientId, data) _
.Tags("signal received") _
.Post()
Return Connection.Broadcast(data)
End Function
End Class

The logging code in the OnReceivedAsync method does not get called for the other web server until the 'test2' message is sent. Once the 'test2' message is sent from the chat client, I get a log event for all the blocked messages from other server, then a log event for 'test2'.