"Endpoint not reachable"

Found the line… I’m using RestSharp to make calls to my app server, which happens before replication starts. RestSharp is trashing DefaultWebProxy.

It appears RestSharp (prior to 106.2.1) has a line that has caused issues:

http.Proxy = this.Proxy ?? WebRequest.GetSystemWebProxy(); IWebProxy defaultWebProxy = WebRequest.DefaultWebProxy; WebRequest.DefaultWebProxy = http.Proxy;

(Version 106.2.0 switches the application proxy to Internet Explorer proxy settings · Issue #1066 · restsharp/RestSharp · GitHub)

After 106.2.1, that line changed to:

WebRequest.DefaultWebProxy = http.Proxy;

If I read that right - that line is a bug. http.Proxy can be null. I have tried RestSharp 106.2.0 and 106.2.1, both exhibit the bug.

So I reset DefaultWebProxy after my REST call:

WebRequest.DefaultWebProxy = WebRequest.GetSystemWebProxy();

And now syncing works. Grumble… I’m going to have to add that line throughout my REST library for now until I can get the RestSharp people to look at this.

Thanks for your help @borrrden.

Paul.