Skip to content

Commit

Permalink
refactor: close stream
Browse files Browse the repository at this point in the history
  • Loading branch information
long2ice committed Dec 27, 2023
1 parent ea83853 commit 7df4fcc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions meilisync/source/mysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 7df4fcc

Please sign in to comment.