Note that there are some explanatory texts on larger screens.

plurals
  1. POSignalr server miss some call the client method
    primarykey
    data
    text
    <p>I am using SignalR v1.1.3 and Silverlight v5 in LongPolling.</p> <p>I have an issue with the server calling methods on the client. The last call either takes a very long time (near 2 minutes) or is simply ignored</p> <p>1st case : Last call takes 2s</p> <pre><code>public void TestMethod(){ Clients.Caller.OnTestMethod(); Clients.Caller.OnTestMethod(); } </code></pre> <p>1st call is immediate, the 2nd one start immediatly too but takes 2 minutes to be catch by the client.</p> <p>Fiddler output (2nd column show elapsed time) : <a href="http://i.stack.imgur.com/BFQi4.png" rel="nofollow">http://i.stack.imgur.com/BFQi4.png</a></p> <p>2nd case : One call takes 2s, One is missed</p> <pre><code>public void TestMethod(){ Clients.Caller.OnTestMethod(); Clients.Caller.OnTestMethod(); Clients.Caller.OnTestMethod(); Clients.Caller.OnTestMethod(); } </code></pre> <p>First two call are "fast", the Third takes 2s and the last one was never sent</p> <p>Fiddler output (2nd column show elapsed time) : <a href="http://i.stack.imgur.com/Yj1fw.png" rel="nofollow">http://i.stack.imgur.com/Yj1fw.png</a></p> <p>Last case : Last call takes 2s</p> <pre><code>public void TestMethod(){ Clients.Caller.OnTestMethod(); Clients.Caller.OnTestMethod(); Clients.Caller.OnTestMethod(); Thread.Sleep(50); Clients.Caller.OnTestMethod(); } </code></pre> <p>Adding a sleep before the last one allowed the call to be done.</p> <p>Fiddler output (2nd column show elapsed time) : <a href="http://i.stack.imgur.com/O7p0Y.png" rel="nofollow">http://i.stack.imgur.com/O7p0Y.png</a></p> <p>The code on the client is </p> <pre><code>await hubProxy.Invoke("TestMethod"); </code></pre> <p><strong>* EDIT *</strong></p> <p>on the client I have a service which create a hubproxy for every hub found on the server :</p> <pre><code> public MyHubConnection() { _hubConnection = new HubConnection(ApplicationHelpers.GetServerRootUri()) {TraceLevel = TraceLevels.All, TraceWriter = Console.Out}; _hubConnection.Error += ErrorFns.HandleError; } public async Task StartAsync() { var time = DateTime.Now; var manager = new EntityManager(); var serverHubs = (List&lt;string&gt;)await manager.InvokeServerMethodAsync("Common.SignalRServices, Common", "GetServerHubs"); foreach (var serverHub in serverHubs) { _hubRepository[serverHub] = _hubConnection.CreateHubProxy(serverHub); } await _hubConnection.Start(new LongPollingTransport()); } public IHubProxy GetHubProxy(string hubName) { if (!_hubRepository.ContainsKey(hubName)) throw new Exception(string.Format("No hub named '{0}'", hubName)); return _hubRepository[hubName]; } </code></pre> <p>I have no idea what's going on ... any clue ?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload