Close client connection on error