Commit 95391fc1 LN

http修改

1 个父辈 31f643d3
...@@ -42,8 +42,10 @@ namespace OnlineStore.Common ...@@ -42,8 +42,10 @@ namespace OnlineStore.Common
protected override WebRequest GetWebRequest(Uri address) protected override WebRequest GetWebRequest(Uri address)
{ {
var result = base.GetWebRequest(address); HttpWebRequest result =(HttpWebRequest) base.GetWebRequest(address);
result.Timeout = this._timeout; result.Timeout = this._timeout;
result.KeepAlive = false;
result.ServicePoint.Expect100Continue = false;
return result; return result;
} }
} }
...@@ -102,7 +104,7 @@ namespace OnlineStore.Common ...@@ -102,7 +104,7 @@ namespace OnlineStore.Common
try try
{ {
var wc = new MyWebClient(10000); var wc = new MyWebClient(timeOut);
if (string.IsNullOrEmpty(wc.Headers["Content-Type"])) if (string.IsNullOrEmpty(wc.Headers["Content-Type"]))
wc.Headers.Add("Content-Type", "application/json;charset=UTF-8"); wc.Headers.Add("Content-Type", "application/json;charset=UTF-8");
wc.Encoding = encoding; wc.Encoding = encoding;
......
...@@ -427,7 +427,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -427,7 +427,7 @@ namespace OnlineStore.DeviceLibrary
isRestart = true ; isRestart = true ;
canWhileCount--; canWhileCount--;
LogUtil.info(subType + " 异常停止,重新开始转动:[" + moveDO + "] [" + checkDI + "] 耗时 [" + FormUtil.GetSpanStr(span) + "]["+canWhileCount+"]"); LogUtil.info(subType + " 异常停止,重新开始转动:[" + moveDO + "] [" + checkDI + "] 耗时 [" + FormUtil.GetSpanStr(span) + "]["+canWhileCount+"]");
LineRunAndWait(moveDO, checkDI, timeOutMS); return LineRunAndWait(moveDO, checkDI, timeOutMS);
} }
isStop = true; isStop = true;
} }
......
...@@ -433,7 +433,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -433,7 +433,7 @@ namespace OnlineStore.DeviceLibrary
// 取消任务地址: /cancelPutInTask //参数: barcode // 取消任务地址: /cancelPutInTask //参数: barcode
private static string Addr_cancelPutInTask = "/cancelPutInTask"; private static string Addr_cancelPutInTask = "/rest/api/qisda/device/cancelPutInTask";
public static string cancelPutInTask(string deviceName, string barcode) public static string cancelPutInTask(string deviceName, string barcode)
{ {
string msg = ""; string msg = "";
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!