Fix lockup if sender is used to send and empty buffer