Fixed issue with reconnect mechanism

When an unexpected error happens when reading frames during the open_connection
method the mechanism failed to kick in and the connection would never be re-established.