NSURLSession cancel Task

后端 未结 2 1263
离开以前
离开以前 2021-01-03 05:40

I create new NSURLSession with following configs

 if (!self.session) {
            NSURLSessionConfiguration *config = [NSURLSessionConfiguration backgroundS         


        
2条回答
  •  北荒
    北荒 (楼主)
    2021-01-03 06:19

    That is the expected behaviour, when you cancel tasks on a session they might still call the delegate method.

    Have you check the state of the given task? It should be NSURLSessionTaskStateCanceling.

提交回复
热议问题