HttpWebRequest用ip代理Timeout和ReadWriteTimeout失效不听话问题
ManualResetEvent mre = new ManualResetEvent(false); var result=""; mre = new ManualResetEvent(false); var t = new Thread(new ThreadStart(delegate() { result=gethtml();//这里是http请求方法 mre.Set(); })); t.IsBackground = true; t.Start(); mre.WaitOne(5000);//设置5秒超时
原创解决方案