eliminate extra loop for creating rpc clients
fix bug where tcp was reusing sockets. Fixes #2.