def async_call(self, *args, **kwargs):
        def after_autoconnect_callback(future):
            if self.is_connected():
                self._call(*args, **kwargs)
            else:
                # FIXME
                pass

        if 'callback' not in kwargs:
            kwargs['callback'] = discard_reply_cb
        if not self.is_connected():
            if self.autoconnect:
                connect_future = self.connect()
                cb = after_autoconnect_callback
                self.__connection._ioloop.add_future(connect_future, cb)
            else:
                error = ConnectionError("you are not connected and "
                                        "autoconnect=False")
                kwargs['callback'](error)
        else:
            self._call(*args, **kwargs)
Restore the window layout.
dataset/ETHPy150Open thefab/tornadis/tornadis/client.py/Client.async_call--crossover with--dataset/ETHPy150Open enthought/pyface/pyface/workbench/workbench.py/Workbench._restore_window_layout