Lengthen retry timeout when socket connection is closed to avoid infinite looping