(self)
Reconnect

        Currently we get a new session every time so we have
        to clear all the data an resubscribe
Reconnect
Reconnect
def _reconnected(self):
        """Reconnect

        Currently we get a new session every time so we have
        to clear all the data an resubscribe"""

        if self._login_data or self._login_token:

            def reconnect_login_callback(error, result):
                if error:
                    if self._login_token:
                        self._login_token = None
                        self._login(self._login_data,
                                    callback=reconnect_login_callback)
                        return
                    else:
                        raise MeteorClientException(
                            'Failed to re-authenticate during reconnect')

                self.connected = True
                self._resubscribe()

            if self._login_token:
                self._resume(self._login_token,
                             callback=reconnect_login_callback)
            else:
                self._login(self._login_data,
                            callback=reconnect_login_callback)
        else:
            self._resubscribe()
def _reconnected ( self ) : if self . _login_data or self . _login_token : def reconnect_login_callback ( error , result ) : if error : if self . _login_token : self . _login_token = None self . _login ( self . _login_data , callback = reconnect_login_callback ) return else : raise MeteorClientException ( 'Failed to re-authenticate during reconnect' ) self . connected = True self . _resubscribe ( ) if self . _login_token : self . _resume ( self . _login_token , callback = reconnect_login_callback ) else : self . _login ( self . _login_data , callback = reconnect_login_callback ) else : self . _resubscribe ( )