Client shutdown improvement. Near cache cleanup fix.
Merge pull request #1990 from mdogan/improvement/3.2/client-shutdown

Client shutdown improvement.