Use a buffered channel as a semaphore to limit max connections.