re-establish connection on error