recreate connection when connection closed