same function call for closing client connection