Lock setControlConnection to prevent races