Fixed broken connecting timeout code.