This is because potentially multiple nodes receive the same pointer. Try converting HeartBeat from struct to class, possibly. Although that may mess with sending and receiving data, as classes aren't guaranteed to have data ordered contiguously in memory.