I was trying to upgrade Fedora 24 to 25. The mirror dnf using was poor. I interrupted the download process many times with the hope that it will connect at a much more speed. But at last I decided to change the mirror that dnf uses. While searching for the correct code to do this, I noticed that there is a plugin that forces dnf use the fastest mirror (fastestmirror). It was already installed in my box but dnf was not instructed to use it. Hence a simple line fastestmirror=true in dnf.conf solved my issue.
Errare humanum est sed perseverare diabolicum.