Skip to content

Commit

Permalink
Merge 353c03f into 6ccbecc
Browse files Browse the repository at this point in the history
  • Loading branch information
roelschroeven committed Feb 12, 2021
2 parents 6ccbecc + 353c03f commit d58932a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pymysql/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,11 @@ def _force_close(self):
self._sock = None
self._rfile = None

__del__ = _force_close
def __del__(self):
if not self._closed:
self.close()
else:
self._force_close()

def autocommit(self, value):
self.autocommit_mode = bool(value)
Expand Down

0 comments on commit d58932a

Please sign in to comment.