diff --git a/meilisync/source/mysql.py b/meilisync/source/mysql.py index 4b2e54a..5f7c4bc 100644 --- a/meilisync/source/mysql.py +++ b/meilisync/source/mysql.py @@ -121,6 +121,7 @@ async def __aiter__(self): except OperationalError as e: logger.exception(f"Binlog stream error: {e}, sleep 10s and retry...") await asyncio.sleep(10) + await self.stream.close() await self._create_stream() async def __aexit__(self, exc_type, exc_val, exc_tb):