diff --git a/pymysqlreplication/binlogstream.py b/pymysqlreplication/binlogstream.py index 519219a6..43da4f8b 100644 --- a/pymysqlreplication/binlogstream.py +++ b/pymysqlreplication/binlogstream.py @@ -65,6 +65,9 @@ def close(self): self._stream_connection.close() self.__connected_stream = False if self.__connected_ctl: + # break reference cycle between stream reader and underlying + # mysql connection object + self._ctl_connection._get_table_information = None self._ctl_connection.close() self.__connected_ctl = False