remove client from CACHE if there is an error
Merge pull request #1 from m0hit/master

Delete client from CACHE on error