Add a check to make debugging easier when the client has been closed previously

Add a check to make debugging easier when the client has been closed previously.  This has a tendency to happen when a misplaced defer() to clean up the client has fired.