allow set connect timeout and clean up