Geez Jules, take a harden up pill...
Seriously, IMO totally up to how you handle variance.
Personally I used to continue playing until I noticed the level of losses was clearly distracting me and I was getting pissed off.
I think this approach was actually inappropriate for me.
What I have since worked out is that after a period of time and a sizeable enough loss I would actually start tilting well before I noticed the frustration. Now by tilting I mean that I wasn't applying the theory based on my understanding of the situation, but started thinking - a little unconsciously - that I couldn't be behind again, or villian couldn't always hit, or something other than "this is the board, these are the villians stats and likely range, these are my outs, this the correct line under these circumstances".
Now, at least I hope, if I'm at a point where I am starting to get away from making clear and reasonable decisions based on what little knowledge I've accumulated, I'm probably tilting, and therefore more likely to be playing -EV.
So, in a nutshell, to make a long story short, to, as it were, cut to the quick, to give it to you straight:
Play while you are playing your best game, quit when you know you are definitely not (unless you have a compelling or sensible reason to continue - eg easily exploitable opponents, volume means more $ ie improved status on a site is achieveable with a bit of grinding).
I read somewhere recently on the forums a Sklansky quote that playing poker is just one long session. I try to think this way as much as possible.
Help any?