This is what appears to be happening: The thread with this code switches out precisely after the structkeyexists() evaluates true. The thread that clears inactive sessions becomes active right after it has previously evaluated this session as expiring, so it deletes the session. The original thread becomes active again, and now has no session, so the second part of the CFIF "session.acceess eq 1" evaluates as an error.
If this is the case then I don't think the race condition could even be prevented by CFLOCKing the CFIF block, as the session-clearing thread would ignore it. It probably hardly ever comes up because the chance of someone suddenly waking up and executing a template that interweaves in that fashion at the exact millisecond that the session times out is rather small. Cute, though. >Maybe try: > ><cfif structKeyExists(session, "access") and session.access eq 1></cfif> > >-- >Damien McKenna - Web Developer - [EMAIL PROTECTED] >The Limu Company - http://www.thelimucompany.com/ - 407-804-1014 >#include <stdjoke.h> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:226712 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

