set rclient.expire for server ttl even when there is no server id

This commit is contained in:
Henry Oswald 2018-08-21 10:36:18 +01:00
parent d99a42e678
commit 473063cf3d

View file

@ -49,7 +49,7 @@ module.exports = (backendGroup)->
return callback()
serverId = @_parseServerIdFromResponse(response)
if !serverId? # We don't get a cookie back if it hasn't changed
return callback()
return rclient.expire(@buildKey(project_id), Settings.clsiCookie.ttl, callback)
if rclient_secondary?
@_setServerIdInRedis rclient_secondary, project_id, serverId
@_setServerIdInRedis rclient, project_id, serverId, (err) ->