Fix checking invalid provider url
In retrospect it turned out that when testing an invalid provider, depending on the network speed, there can be a positive false.
Fixup of ebb9d8d