Skip to content

Commit 3a923fe

Browse files
authored
Merge pull request #33 from leo108/master
1. 去除测试用的打印 2. 修复重试情况下,不会返回数据的BUG
2 parents 8af19c2 + 39fb416 commit 3a923fe

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/JPush/JPush.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public function _request($url, $method, $body=null, $times=1) {
120120
throw new APIConnectionException("Connect timeout. Please retry later. Error:" . $errorCode . " " . curl_error($ch));
121121
} else {
122122
$this->log("Send " . $method . " " . $url . " fail, curl_code:" . $errorCode . ", body:" . $body . ", times:" . $times);
123-
$this->_request($url, $method, $body, ++$times);
123+
return $this->_request($url, $method, $body, ++$times);
124124
}
125125
} else {
126126
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);

src/JPush/core/DevicePayload.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ public function getDevicesStatus($registrationId) {
211211
$response = $this->client->_request(DevicePayload::DEVICE_STATUS_URL, JPush::HTTP_POST, json_encode($payload));
212212
if($response['http_code'] === 200) {
213213
$body = array();
214-
echo $response['body'];
215214
$body['data'] = (array)json_decode($response['body']);
216215
$headers = $response['headers'];
217216
if (is_array($headers)) {
@@ -253,4 +252,4 @@ private function __processResp($response) {
253252
throw new APIRequestException($response);
254253
}
255254
}
256-
}
255+
}

0 commit comments

Comments
 (0)