dropbox-sdk-dotnet icon indicating copy to clipboard operation
dropbox-sdk-dotnet copied to clipboard

Dropbox Client uses wrong httpclient which causes port exhaustion

Open evolvedlight opened this issue 3 years ago • 1 comments

Describe the bug When using the Dropbox client in high traffic multithreaded environment, it's possible to easily exhaust all connections

To Reproduce In a loop, keep creating Dropbox Clients and performing a request. In the options object, pass in a HTTPClient.

Expected Behavior HttpClient is used for all requests

Actual Behavior Authentication code makes a new HttpClient each time

Versions

  • SDK latest, 6.31.0
  • Dotnet 6
  • Linux kubernetes

Additional context It's also difficult to see what the recommended way is to reuse Dropbox clients - ie it's not very threadsafe but it's also bad to keep creating new Dropbox Clients

evolvedlight avatar Sep 15 '22 07:09 evolvedlight

Thanks for the report and PR!

greg-db avatar Sep 15 '22 13:09 greg-db