Make RPC connection tracking exception safe. Fixes #124