issue: 424207 adding check that client was established before closing

Change-Id: I26cc5274687642de53a1d5303673349515340add