You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
com.duosecurity.client.Http is a per-request object and it is instantiating a new OkHttpClient instance in its constructor. OkHttpClient should be shared across all requests rather than a new instance created for each request.
OkHttp performs best when you create a single OkHttpClient instance and reuse it for all of your HTTP calls. This is because each client holds its own connection pool and thread pools. Reusing connections and threads reduces latency and saves memory. Conversely, creating a client for each request wastes resources on idle pools.
The text was updated successfully, but these errors were encountered:
com.duosecurity.client.Http
is a per-request object and it is instantiating a newOkHttpClient
instance in its constructor.OkHttpClient
should be shared across all requests rather than a new instance created for each request.From the OkHttpClient documentation:
The text was updated successfully, but these errors were encountered: