A little change in hangDetector
Do not use 'terminating' flag, use errorhappened instead
Comment for handle_one_request