The close callback prints "preparing to reconnect", but this snippet does not show a reconnect policy. I would test it by dropping the connection after a confirmed subscription: log the disconnect time, reconnect with bounded backoff, confirm the new subscription, and compare the last timestamp before the drop with the first after it. A healthy socket after recovery does not by itself prove that the missing interval was backfilled.