From 0953efd5a0044756857860ca76c45f6690c5a423 Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Fri, 12 Dec 2014 22:17:41 -0800 Subject: [PATCH] consul: Minor cleanup --- consul/state_store.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/consul/state_store.go b/consul/state_store.go index 3cd70dbe8c..273311435f 100644 --- a/consul/state_store.go +++ b/consul/state_store.go @@ -1328,10 +1328,11 @@ func (s *StateStore) SessionCreate(index uint64, session *structs.Session) error } switch session.Behavior { - case structs.SessionKeysRelease, structs.SessionKeysDelete: - // we like case "": - session.Behavior = structs.SessionKeysRelease // force default behavior + // Default behavior is Release for backwards compatibility + session.Behavior = structs.SessionKeysRelease + case structs.SessionKeysRelease: + case structs.SessionKeysDelete: default: return fmt.Errorf("Invalid Session Behavior setting '%s'", session.Behavior) }