Skip to content

Commit

Permalink
Merge pull request #21 from ppanphper/master
Browse files Browse the repository at this point in the history
修复send失败后无法切换线路重试的问题
  • Loading branch information
hehexianshi authored Sep 20, 2016
2 parents 03f8a2e + 60f6625 commit 6cdec22
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,10 @@ private function doRequest($sendData, $type)
$errorcode = $client->errCode;

//destroy error client obj to make reconncet
self::$client[$this->currentClientKey]->close();
unset(self::$client[$this->currentClientKey]);
// mark the current connection cannot be used, try another channel
$this->serverConfigBlock[$this->connectGroup][$this->currentClientKey] = 1;

if ($errorcode == 0) {
$msg = "connect fail.check host dns.";
Expand Down

0 comments on commit 6cdec22

Please sign in to comment.