add reconnect func
add connect retry
update