Fix persistent reset_connection issue (#33590)
Fixes #33589 If persistent socket does not exist catch the execption and ignore it as the coneection is already closed.pull/4420/head
parent
666692069d
commit
dfd68e4966
|
@ -913,8 +913,12 @@ class StrategyBase:
|
||||||
play_context.set_options_from_plugin(connection)
|
play_context.set_options_from_plugin(connection)
|
||||||
|
|
||||||
if connection:
|
if connection:
|
||||||
|
try:
|
||||||
connection.reset()
|
connection.reset()
|
||||||
msg = 'reset connection'
|
msg = 'reset connection'
|
||||||
|
except ConnectionError as e:
|
||||||
|
# most likely socket is already closed
|
||||||
|
display.debug("got an error while closing persistent connection: %s" % e)
|
||||||
else:
|
else:
|
||||||
msg = 'no connection, nothing to reset'
|
msg = 'no connection, nothing to reset'
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue