Oyatel / CometD.NET

CometD.NET is a C# client library for the Bayeux protocol
44 stars 34 forks source link

Publish does not send message before next "connect" #1

Closed grEvenX closed 13 years ago

drudge commented 13 years ago

What do you mean by this?

grEvenX commented 13 years ago

There's an issue currently when publishing messages sequentially one after the other without sending them in a batch operation.

drudge commented 13 years ago

We are experiencing delays using the long-polling connection type and subscribing.

Once a subscription is made, publishing can take anywhere from 1-20 seconds before it is actually sent and received by the bayeux server. We tracked the delay down to BeginGetRequestStream in the Send method.

Could this be related?

grEvenX commented 13 years ago

This could indeed be related. I will see If we can get some time by the end of the week to dig into the issue. If you find anything in the meantime, we'd appreciate any info.

grEvenX commented 13 years ago

We are currently working on a fix, we have been able to identify the issue, but we need to resolve some new challenges that appeared during the fix. My guess is that a fix will be made available for this issue by tomorrow.

magnusga commented 13 years ago

Http allows for only two simultaneous connections per client per server. When attempting more than two connections the third one froze until some other activity re-triggered it. Messages may be batched together, so this error wouldn't always show.

I've made a fix in LongPollingTransport.cs which queues requests, so they will immediately be executed when an old request returns. Please let us know if there are more issues.