Retry getting group id in case of errors
This is a quick fix for the random connection errors that can happen when starting a new substream. A similar fix might be necessary for the receiver.
An alternative solution is to reuse the same group id of the previous substream. I think that the effects of group ids are local to substreams, so that might be safe to do and it avoids the error completely.