作者 邓超

优化

@@ -115,7 +115,7 @@ class ImapClient { @@ -115,7 +115,7 @@ class ImapClient {
115 $bytesWritten = 0; 115 $bytesWritten = 0;
116 $maxW = $this->timeOut*10; 116 $maxW = $this->timeOut*10;
117 while ($bytesWritten < $totalBytes) { 117 while ($bytesWritten < $totalBytes) {
118 - $result = fwrite($this->socket, substr($cmd, $bytesWritten)); 118 + $result = @fwrite($this->socket, substr($cmd, $bytesWritten));
119 // 写失败了 119 // 写失败了
120 if ($result === false) { return false; } 120 if ($result === false) { return false; }
121 121
@@ -207,6 +207,8 @@ class ImapClient { @@ -207,6 +207,8 @@ class ImapClient {
207 break; 207 break;
208 } 208 }
209 } 209 }
  210 + }else{
  211 + throw new \Exception($this->host.' write error '.$cmd);
210 } 212 }
211 213
212 return $result; 214 return $result;