Commit 56fb7aa5 authored by justcoding121's avatar justcoding121

enable connection pool by default

parent 32c750fb
...@@ -23,7 +23,7 @@ namespace Titanium.Web.Proxy.Examples.Basic ...@@ -23,7 +23,7 @@ namespace Titanium.Web.Proxy.Examples.Basic
public ProxyTestController() public ProxyTestController()
{ {
proxyServer = new ProxyServer(); proxyServer = new ProxyServer();
proxyServer.EnableConnectionPool = true; //proxyServer.EnableConnectionPool = false;
// generate root certificate without storing it in file system // generate root certificate without storing it in file system
//proxyServer.CertificateManager.CreateRootCertificate(false); //proxyServer.CertificateManager.CreateRootCertificate(false);
......
...@@ -155,10 +155,10 @@ namespace Titanium.Web.Proxy ...@@ -155,10 +155,10 @@ namespace Titanium.Web.Proxy
public bool Enable100ContinueBehaviour { get; set; } public bool Enable100ContinueBehaviour { get; set; }
/// <summary> /// <summary>
/// Should we enable experimental Tcp server connection pool? /// Should we enable server connection pool?
/// Defaults to false. /// Defaults to true.
/// </summary> /// </summary>
public bool EnableConnectionPool { get; set; } public bool EnableConnectionPool { get; set; } = true;
/// <summary> /// <summary>
/// Buffer size used throughout this proxy. /// Buffer size used throughout this proxy.
......
...@@ -191,6 +191,7 @@ namespace Titanium.Web.Proxy ...@@ -191,6 +191,7 @@ namespace Titanium.Web.Proxy
// create a new connection if cache key changes. // create a new connection if cache key changes.
// only gets hit when connection pool is disabled. // only gets hit when connection pool is disabled.
// or when prefetch task has a unexpectedly different connection.
if (serverConnection != null if (serverConnection != null
&& (await getConnectionCacheKey(args, false, && (await getConnectionCacheKey(args, false,
clientConnection.NegotiatedApplicationProtocol) clientConnection.NegotiatedApplicationProtocol)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment