if dbid is provided, lazyConnection will loseConnection and stop reconnecting on redis server restart etc.
Connection should not be closed here:
if self.dbid is not None:
try:
response = yield self.select(self.dbid)
if isinstance(response, ResponseError):
raise response
except Exception as e:
self.factory.continueTrying = False
self.transport.loseConnection()
msg = "Redis error: could not set dbid=%s: %s" % \
(self.dbid, str(e))
self.factory.connectionError(msg)
if self.factory.isLazy:
log.msg(msg)
defer.returnValue(None)
if dbid is provided, lazyConnection will loseConnection and stop reconnecting on redis server restart etc. Connection should not be closed here: