Retrofit: Question锛歐hen activity destroy,but request is going,what I want to do?

Created on 21 Jul 2016  路  2Comments  路  Source: square/retrofit

What kind of issue is this?

  • [ ] Question. This issue tracker is not the place for questions. If you want to ask how to do
    something, or to understand why something isn't working the way you expect it to, use Stack
    Overflow. https://stackoverflow.com/questions/tagged/retrofit
  • [ ] Bug report. If you鈥檝e found a bug, spend the time to write a failing test. Bugs with tests
    get fixed. Here鈥檚 an example: https://gist.github.com/swankjesse/6608b4713ad80988cdc9
  • [ ] Feature Request. Start by telling us what problem you鈥檙e trying to solve. Often a solution
    already exists! Don鈥檛 send pull requests to implement new features without first getting our
    support. Sometimes we leave features out on purpose to keep the project small.

Most helpful comment

Call Call.cancel() to cancel the request. Please ask usage questions on StackOverflow with the 'retrofit' tag.

All 2 comments

Would it help to override your onDestroy and explicitly clean up your requests there?

Call Call.cancel() to cancel the request. Please ask usage questions on StackOverflow with the 'retrofit' tag.

Was this page helpful?
0 / 5 - 0 ratings