ensure connection close
add connect_timeout to config