There is a potential race condition inside TestCli: when the http server hasn't started with the async call, but the sendMsg tries to contact the server already. A quick ugly fix would be to wait a few milliseconds in the client, but a potential better fix would be to have some synchronization (like the ready channel). Should we take this race into consideration when we're implementing the sendMsg in cli/cli.go?
Thanks for your time and have a nice day :)