added retry if http connection is closed