Add closing timeout support.