Strange issue with gitlab.io subdomains

That’s an interesting change we could actually do.

I quickly checked if I could understand what happens behind the scenes, and I think I found a possible cause for the current behavior.
At the moment, we associate a certain stream to a circuit when it’s successful (the stream received a reply). We need this passage because Tor opens a few circuits in advance (I think to improve performances, but I don’t really know much about the daemon) and when you connect to a new first party you usually open a stream with a circuit that was already built but not used yet.
In the failure cases you brought, the stream never succeeds when associated to the failing circuits, it arrives to a DETACHED instead, then switches to another circuit, and a STREAM SENTCONNECT event is sent through the control port.
Switching from the SUCCEEDED to the SENTCONNECT event could do what you ask (not sure, I haven’t tried).
At the moment the code for the tor integration is undergoing a big refactor, I’d prefer to get that merged before doing this change.
However, we can open an issue to follow up later. Do you have a GitLab account and do you want to open one, or do you prefer me to do it?

Thanks!