Add shutdown guard to Recorder pool in case there is no connection (#68407)
parent
3150915cb7
commit
6ffef8373b
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue