Add shutdown guard to Recorder pool in case there is no connection (#68407)

pull/68355/head
J. Nick Koston 2022-03-20 01:28:44 -10:00 committed by GitHub
parent 3150915cb7
commit 6ffef8373b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ class RecorderPool(SingletonThreadPool, NullPool):
def shutdown(self):
"""Close the connection."""
if self.recorder_or_dbworker and (conn := self._conn.current()):
if self.recorder_or_dbworker and self._conn and (conn := self._conn.current()):
conn.close()
def dispose(self):