cleanup/refactor in client heartbeat implementation
 cleanup/refactor in client heartbeat implementation
 cleanup/refactor in client heartbeat implementation
Merge pull request #3403 from sancar/cleanup/heartbeat/master

cleanup/refactor in client heartbeat implementation