http connection timeout issues

前端 未结 10 1593
感情败类
感情败类 2020-12-13 20:54

I\'m running into an issue when i try to use the HttpClient connecting to a url. The http connection is taking a longer time to timeout, even after i set a connection timeoo

10条回答
  •  醉话见心
    2020-12-13 21:16

    How are you making the HTTP Connection? This looks like a threading issue. If you are using a background thread, then the thread may be killed along with any timeout registered. The fact that it works the next time tells me that your code will work, if you make the call in a android component and manage the WAKE_LOCK on it yourself. Anyways please post more information about the calling mechanism?

提交回复
热议问题