Added Pending check to ensure there is a client waiting before trying to
connect