Timeout between thread ending and client shutdown