Closing the connection can have the effect of abandoning frames that haven't been written yet. This is noticable with recent versions of when.js (v2.5.1 say) which will run the thunk given to `.ensure`, thereby closing the connection, before the publish has been written to the socket.
Requires a UUID generator. It's pretty easy to make random strings for correlation IDs, but the original tutorials specifically use UUID modules. I depart a bit from the original tutorials in the rpc_client. I don't consider the class wrapping the RPC very useful.
Previously, I was closing the connection only success; however, I really want to close the connection whatever happens in the connection open continuation. Closing only on success means the program keeps running (because I/O to do ..) on errors.
Also: only try the one time to close the connection on SIGINT