Add countdown latch to socket connection