joerussbowman / AsyncMongo-Sessions

A sessions library for Tornado using AsyncMongo
30 stars 2 forks source link

The UGLY HACK, finish getting called early on some requests #3

Closed joerussbowman closed 12 years ago

joerussbowman commented 12 years ago

Commit 0c2cb8ffa755bda920395fcfa2c96d0cdc243cb0 has an ugly hack in it.

The problem is I found that on some requests, notably a post in the case where I was able to produce it, finish was getting called early. It appeared to get called during the db lookup where _validate_session was the callback. Testing showed that finish was getting called even before _validate_session was called, so somehow on that read from MongoDB. I don't see any reference to finish method in asyncmongo at all. Not sure what's going on there.

Later I may try to come up with a solid test case I can post code for reproducing. Right now a work around is in place and I may just leave it so I can get back to work prototyping the application I started building this session library for.

joerussbowman commented 12 years ago

I fixed this without closing the issue.