add heartbeat lock