Improve local connection manager (used in tests)