Http connection timeout on Android not working

前端 未结 5 1603
悲&欢浪女
悲&欢浪女 2020-11-27 12:29

I\'m writing an application that connects to a webservice and I don\'t want it to wait too long if it can\'t get a connection. I therefore set the connectionTimeout of the h

5条回答
  •  鱼传尺愫
    2020-11-27 12:48

    See: https://stackoverflow.com/a/20031077/2609238

    The problem might be in the Apache HTTP Client. See HTTPCLIENT-1098. Fixed in 4.1.2.

    The timeout exception tries to reverse DNS the IP, for logging purposes. This takes an additional time until the exception is actually fired.

提交回复
热议问题