Fix RPC connection leaks.