feature: added a handler for ssl exceptions.

Now it just reconnects when ssl connection drops.