Foren

NSURLSession connectionTimeout

Alessandro Benvenuti, geändert vor 6 Jahren.

NSURLSession connectionTimeout

New Member Beiträge: 2 Beitrittsdatum: 12.09.17 Neueste Beiträge
Hi all,

I found an issue configuring the LRSession's connectionTimeout.

Environment: iOS
SDK Version: 7.0.12

LRSession enables to configure a custom connectionTimeout value, that's I expect to be used in the concrete NSURLRequest.
Today I found out that it's not the case because in
+ (void)_sendAsynchronousRequest(NSURLRequest *)request session:(LRSession *)session {
the session.connectionTimeout value is ignored and the NSURLSession is created with a default NSURLSessionConfiguration object that has a value of 60 for timeoutIntervalForRequest.

This is obviously misleading and doesn't allow the developer to setup the value I need for the timeout.
Would be great to have this fixed and it would be even better to have two different values to setup, such as in NSURLSessionConfiguration: timeoutIntervalForRequest and timeoutIntervalForResource.

What do you think about it guys? Is there any other way to change the timeout that I didn't find out?

Let me know if you needed anything else from my side.

Kind Regards,
Alessandro
Alessandro Benvenuti, geändert vor 6 Jahren.

RE: NSURLSession connectionTimeout

New Member Beiträge: 2 Beitrittsdatum: 12.09.17 Neueste Beiträge
BTW: I've already open an issue on your GitHub page about this: https://github.com/liferay/liferay-mobile-sdk/issues/48.

Let me know if you wanted me to send a Pull Request with a fix and how would you like me to do so.

Thanks,
Alessandro