Thanks for your reply. I do check for network connectivity before
making a call. But the case i am referring to is if there is a Wifi
network available but the Wifi does not have an internet
connectivity.

In that case the network connectivity check would fail. It will show
as if we have an network connection but we actually don't have an
internet connection.

Another case that we might face is that if a user is traveling in an
area where the network connectivity is fluctuating.

In this cases is it not necessary for us to set a proper timeout..?.
And if the timeout happens in a synchronous manner then it might take
a long time for the last call to time out.


On Jan 18, 8:18 pm, JP <joachim.pfeif...@gmail.com> wrote:
> Interesting... My recommendation here would be not to agonize over
> this and rather use 
> NetworkInfohttp://developer.android.com/reference/android/net/NetworkInfo.html
> to determine connectivity status and not create those threads in the
> first place during periods where no network connection exists.
> Also, 20s Timeout seems awfully long. I am working with 4s, which is
> more than enough to determine a connection request couldn't get
> through. Then retry (I retry once, before branching into "error"
> handling)
>
> On Jan 18, 6:55 am, And-Rider <rahulregunat...@gmail.com> wrote:
>
> > Just to be more clear why is the timeout not happening in a
> > Asynchronous manner...? Why is it waiting for the first call to
> > timeout before proceeding to the next call though i am opening two
> > connections in two different threads...?
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to