Actually block the scan threads when sleeping, add connect timeout.