the previous patch allowed the callback to be called only once, whereas this one will be long-lived for the duration of the connection