Please report new issues athttps://github.com/DOCGroup
The optimization(s) that prevents IOP::ServiceContexts from being added to the outgoing request IOP::ServiceContextList upon a connection retry (e.g. LOCATION_FORWARD or a transport retry) also prevents the PortableInterceptor::ClientRequestInfo::add_request_service_context() method from working properly. That method may potentially attempt to add a IOP::ServiceContext during each connection retry. However, the optimization in question prevents the IOP::ServiceContextList from being reset. As such, add_request_service_context) may fail due to the duplicate already in the service context list. In my opinion, we should drop this optimization. Besides, how often do LOCATION_FORWARDs or transport retries occur compared to successful invocations? I think that we can simply set the IOP::ServiceContextList length to zero. That way, we can reset the contents of the request IOP::ServiceContextList without causing additional allocations due to service context list growth since the underlying buffer will not be deallocated when reducing the length of the list.
Accepted. We may or may not get to this before TAO 1.2 is released.
This has long been fixed when we did the stub refactoring