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/33538/merge
Ganesh Nalawade 7 years ago committed by GitHub
parent 666692069d
commit dfd68e4966
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -913,8 +913,12 @@ class StrategyBase:
play_context.set_options_from_plugin(connection)
if connection:
connection.reset()
msg = 'reset connection'
try:
connection.reset()
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:
msg = 'no connection, nothing to reset'
else:

Loading…
Cancel
Save