Commit 3ff71adf by HanSon Committed by GitHub

Merge pull request #22 from HanSon/dev

修改超时设置
2 parents d023f430 8ecc3db8
......@@ -130,16 +130,16 @@ class MessageHandler
list($retCode, $selector) = $this->sync->checkSync();
if(in_array($retCode, ['1100', '1101'])){ # 微信客户端上登出或者其他设备登录
if($this->exitHandler){
Console::log('[INFO] 微信客户端正常退出');
if($this->exitHandler){
call_user_func_array($this->exitHandler, []);
}
break;
}elseif ($retCode == 0){
$this->handlerMessage($selector);
}else{
if($this->exceptionHandler){
Console::log('[INFO] 微信客户端异常退出');
if($this->exceptionHandler){
call_user_func_array($this->exitHandler, []);
}
break;
......
......@@ -32,7 +32,7 @@ class Sync
]);
try{
$content = http()->get($url);
$content = http()->get($url, [], ['connect_timeout' => 60]);
preg_match('/window.synccheck=\{retcode:"(\d+)",selector:"(\d+)"\}/', $content, $matches);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!