Skip to content
This repository has been archived by the owner on Jan 14, 2018. It is now read-only.

request processor listeners loss fix #296

Merged
merged 1 commit into from
Jun 10, 2014

Conversation

seva-ask
Copy link
Contributor

Hello!
It's me again with strange multithreaded bugs :)
I've noticed that sometimes my request listeners are not called and then have found these lines in log:

04-20 04:11:56.448 14869-14928/ru.car2car.droid D/RequestProcessor.java:85﹕ 04:11:56.454 SpiceManagerThread 0 Adding entry for type class ru.car2car.droid.requests.api.methods.user.UserProfileRequest$Response and cacheKey http#3A#2F#2Fcar2car.ru#2Fapi#2Fuser#2Fprofile#2F#3Fsession_id#3D535313aa563d22.57601009#0b4dc5b937dd4d3e02881fb3ff20331b.
04-20 04:11:56.448 14869-14927/ru.car2car.droid D/RequestProcessor.java:85﹕ 04:11:56.455 SpiceManagerThread 0 Adding entry for type class ru.car2car.droid.requests.api.methods.user.UserProfileRequest$Response and cacheKey http#3A#2F#2Fcar2car.ru#2Fapi#2Fuser#2Fprofile#2F#3Fsession_id#3D535313aa563d22.57601009#0b4dc5b937dd4d3e02881fb3ff20331b.

It was strange that same log message was repeated almost at same time.
In code I found that request processor has not synchronized adding requests.
I also have written a test that failes with old version and passes with new.

P.S. You asked me to tell when project using Robospice will be released to market. So it's there: https://play.google.com/store/apps/details?id=ru.stream.droid. I think later I can give links to some more our projects with Robospice.

@stephanenicolas
Copy link
Owner

Hi @seva-ask, I am having a look into this bug fix. Thanks for submitting it.

@stephanenicolas stephanenicolas added this to the 1.4.13 milestone Jun 10, 2014
@stephanenicolas stephanenicolas self-assigned this Jun 10, 2014
@stephanenicolas stephanenicolas merged commit 682a826 into stephanenicolas:master Jun 10, 2014
@stephanenicolas
Copy link
Owner

Thx for this bug fix. I am not sure, but you might have solved one of the source of very rarely occuring bug on CI server ... Let's see.

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

Successfully merging this pull request may close these issues.

2 participants