Add the check logic for the client connection