zdila/LittleProxy — comment on commit d06e724767c90d8d11b359d5977f660fd65d40e0
File: src/main/java/org/littleshoot/proxy/HttpRequestHandler.java line 357
By zdila:

As for PAC, getChainProxy should return the current working proxy on every call. It should not return different proxy on every call. onCommunicationError method is used to mark the proxy as disfunctional so that next call to getChainProxy will return next proxy from the chain.

So the getChainProxy for PAC should return the same result until onCommunicationError is called.

But if proxy.pac is nondeterministic (it is usually not the case), then the issue can occur. This should be maybe fixed later somehow - eg. to cache the result.