Update ConnectionManager to avoid concurrent modification