断线重连.

async def reconnect(self):
        """断线重连."""
        self.clean()
        try:
            self.writer.close()
        except:
            pass
        self.closed = True
        await self.connect()
        if self.debug:
            print("reconnect to {}".format((self.hostname, self.port)))