Added improved detection of a valid connection vs a stalled connection attempt