Better handling if a connection is closed and reopened.