fixed bug in handling connection timeout retry logic