[NEW] Listening to the `connect_error` event

Hi there,

I just add a callback for the `connect_error` handler because without it we are not able to check whether the connection with the server is ok.

By the way I updated the client to the 1.2.0 version.