Only wake up the first waiting thread on checkin, rather than all of them. Check connection state on every socket acquisiton attempt