Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JMS 4.0.7 Xamarin Android: .NET initial connection failure - buffer fills very slowly with new data to read #7

Open
satishbadugu opened this issue Jan 16, 2015 · 0 comments

Comments

@satishbadugu
Copy link

An XML representation of a search request

Client technology: .NET/Xamarin

Browser with Version: n/a

Client O/S with Version: Android 4.4.2

Same-origin / Cross-origin? n/a

*Gateway with version: * JMS Edition (4.0.7.529 Beta)
Gateway Java version: 1.7.0_71-b14
Server OS with version: 1.7.0_71-b14
Gateway Service: jms

Observed behaviour:
Connection randomly fails. When I debug the issue down I found that when HttpRequest.BeginRead method being called it gets stuck there for a few seconds after which Connection Timer gets fired in 5 seconds and connection will be closed. I checked the wireshark and I can see that gateway is sending the data.

09:36:13.401: HttpRequest: thread(6) OpenHandler: Entering [3]
09:36:13.402: HttpRequest: thread(6) Status Code: OK [3]
09:36:13.402: HttpRequest: thread(6) OnOpen: Firing Open Event [3]
09:36:13.402: EmulatedHttpRequest: thread(6) RequestReady: OpenHandler [3]
09:36:13.402: HttpRequest: thread(6) BeginRead [3]
12/28/2014 9:36:16 AM Connect Timer fired

This issue does not really reproduce in device so I guess this is got something with performance as well.

So people are facing the same issue as well.
http://forums.xamarin.com/discussion/15474/tcpclient-buffer-fills-very-slowly-with-new-data-to-read as workaround they are trying reading the stream synchronously and just experimenting with adding a delay in the loop or some forums suggesting to use AsyncRead instead of BeginRead.

I have tried to increase timeout but it switches to long pulling not sure if it is right way of doing it.


Imported from JIRA
Originally reported by: Akram Yakubov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant