调试出了一个诡异的问题,使用多个进程没问题,单进程出现了。

fix:

//默认限制为2个连接
//public const int DefaultPersistentConnectionLimit = 2;
ServicePointManager.DefaultConnectionLimit = int.MaxValue;

        // Summary:
        //     The default number of non-persistent connections (4) allowed on a System.Net.ServicePoint
        //     object connected to an HTTP/1.0 or later server. This field is constant but
        //     is no longer used in the .NET Framework 2.0.
        public const int DefaultNonPersistentConnectionLimit = 4;
        //
        // Summary:
        //     The default number of persistent connections (2) allowed on a System.Net.ServicePoint
        //     object connected to an HTTP/1.1 or later server. This field is constant and
        //     is used to initialize the System.Net.ServicePointManager.DefaultConnectionLimit
        //     property if the value of the System.Net.ServicePointManager.DefaultConnectionLimit
        //     property has not been set either directly or through configuration.
        public const int DefaultPersistentConnectionLimit = 2;

 

 

相关文章:

  • 2021-10-16
  • 2021-07-07
  • 2021-08-18
  • 2021-07-15
  • 2022-12-23
  • 2022-01-04
  • 2021-10-18
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-26
  • 2022-12-23
  • 2021-10-21
  • 2021-06-16
相关资源
相似解决方案