def on_close(self, callback):

        self._close_callback = callback
        return self
Register a callback that is run after the stream is closed.
dataset/ETHPy150Open HenryHu/pybbs/xmpp/readstream.py/ReadStream.on_close