allow setting heartbeat to 0 (no heartbeat)