Make the race condition described in #250 less likely by changing the JS code which handles clicks on the upvote and downvote buttons to not send a new post request before the previous one has completed.
I was able to reproduce the race condition on my dev server after adding 5 calls to gevent.sleep(0.1) sprinkled throughout cast_vote in misc.py. I tested this change against the modified cast_vote and could not reproduce the vote counting error.
Make the race condition described in #250 less likely by changing the JS code which handles clicks on the upvote and downvote buttons to not send a new post request before the previous one has completed.
I was able to reproduce the race condition on my dev server after adding 5 calls to
gevent.sleep(0.1)
sprinkled throughoutcast_vote
inmisc.py
. I tested this change against the modifiedcast_vote
and could not reproduce the vote counting error.