Prepare stream buffer on retry.

This allows to send messages which arrived while we were sleeping before
retrying.

As per #1.