Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request's resume() called twice if the session starts requests automatically #3

Open
frederic-c-dcode opened this issue Jan 18, 2017 · 2 comments

Comments

@frederic-c-dcode
Copy link

When creating a signal using the func toSignal(), resume() is called on the request. If the session on which the request is executed has startRequestsImmediately = true, then this would end up calling twice resume() for this request.

This is noticeable when using the AlamofireNetworkActivityIndicator framework, because for a single request, the activity indicator count is incremented twice (and only decremented once when the request completes).

@srdanrasic
Copy link
Contributor

Thanks for reporting this. Do you have an idea how to fix it? Would you like to do a PR? :)

@frederic-c-dcode
Copy link
Author

If I'm not wrong, the request has no reference to the session, so there's no way to check is the session has startRequestsImmediatelyset to true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants