Handle heartbeats received by long-lived Publishers

This causes the publisher to discard the heartbeat message and read the next message from the socket.