relay: add a missing buffer availability check