NSMutableURLRequest not obeying my timeoutInterval

前端 未结 3 498
野性不改
野性不改 2020-11-29 20:28

I\'m POST\'ing a small image, so i\'d like the timeout interval to be short. If the image doesn\'t send in a few seconds, it\'s probably never going to send. For some unknow

3条回答
  •  感情败类
    2020-11-29 21:01

    As François mentioned above, the 240 seconds seemed to be working as he described up until iOS 6 (including on 5.1). Now, this timeout appears to take on the default value of 60 seconds as expected (if you didn't explicitly set it yourself), so if you have a POST request that might have relied on the longer time inadvertently, you might need to change the timeoutInterval manually to use a higher value. I've been able to set the timeout both below and above 60 seconds for a POST so it doesn't appear that the 60 second mark represents a minimum restriction to the timeout for this type of request either.

提交回复
热议问题