Why is this code not reporting the error more quickly?

A minute is a suspicious amount of time. I suspect that one of your routines has a timeout. I'll guess that it's connect.