The current implementation creates a new HttpClient for each request. This could eventually lead to all the available network sockets being consumed on the host machine in a heavily used environment.
https://github.com/mavezeau/TeamCitySharp/blob/master/src/TeamCitySharp/Connection/TeamCityCaller.cs#L250
The HttpClient is intended to be long lived with a single instance being reused for the lifetime of the application.
https://aspnetmonsters.com/2016/08/2016-08-27-httpclientwrong/
https://blogs.msdn.microsoft.com/shacorn/2016/10/21/best-practices-for-using-httpclient-on-services/
You will find similar items on StackOverflow
Simple fix here might be to create the HttpClient once when calling the create method for the first time and then reissue the same client on subsequent calls (may need to think about multiple threads).
The current implementation creates a new HttpClient for each request. This could eventually lead to all the available network sockets being consumed on the host machine in a heavily used environment.
https://github.com/mavezeau/TeamCitySharp/blob/master/src/TeamCitySharp/Connection/TeamCityCaller.cs#L250
The HttpClient is intended to be long lived with a single instance being reused for the lifetime of the application.
https://aspnetmonsters.com/2016/08/2016-08-27-httpclientwrong/
https://blogs.msdn.microsoft.com/shacorn/2016/10/21/best-practices-for-using-httpclient-on-services/
You will find similar items on StackOverflow
Simple fix here might be to create the HttpClient once when calling the create method for the first time and then reissue the same client on subsequent calls (may need to think about multiple threads).