diff --git a/api/client.go b/api/client.go index dd752048e42b48f60885e0e130405634bd2384ae..9506b4ab6a9dbabc610b3c2b29b01df8d3995375 100644 --- a/api/client.go +++ b/api/client.go @@ -218,8 +218,6 @@ func (cl *Client) Logout(timeoutDuration time.Duration) error { cl.session = nil cl.receptionManager = nil cl.topology = nil - cl.opStatus = nil - cl.rekeyChan = nil cl.registrationVersion = "" return nil diff --git a/api/client_test.go b/api/client_test.go index f99e8e3b259d51228b6461172f6361336ecced8e..c16790f352b0ba237b55f4e1d8ee2a708a320aab 100644 --- a/api/client_test.go +++ b/api/client_test.go @@ -616,14 +616,7 @@ func TestClient_LogoutHappyPath(t *testing.T) { t.Logf("Topology should be set to nil on shutdown") t.Fail() } - if tc.opStatus != nil { - t.Logf("OPstatus should be set to nil on shutdown") - t.Fail() - } - if tc.rekeyChan != nil { - t.Logf("rekeyChan should be set to nil on shutdown") - t.Fail() - } + //Test that the things that should not be nil are not nil if tc.ndf == nil { @@ -634,6 +627,14 @@ func TestClient_LogoutHappyPath(t *testing.T) { t.Logf("Storage should not be set to nil") t.Fail() } + if tc.opStatus == nil { + t.Logf("OPstatus should not be set to nil on shutdown") + t.Fail() + } + if tc.rekeyChan == nil { + t.Logf("rekeyChan should not be set to nil on shutdown") + t.Fail() + } } //Test that the client shutdown will timeout when it fails to shutdown