Changed client keepalive logic to use the dynamic interval value