mirclient: Properly check for failed connections to the server
mirclient: Properly check for failed connections to the server

Failing to do so leads to invalid/error connections being used platform-api, leading to crashes.
. Fixes: https://bugs.launchpad.net/bugs/1233988.

Approved by Robert Carr, PS Jenkins bot.