Use a faster method to detect errors when reading a line from the server.

This commit is contained in:
Daniele Alessandri
2011-01-04 11:08:55 +01:00
parent 306ed28c5d
commit 2b809325e0
+1 -1
View File
@@ -1449,7 +1449,7 @@ class TcpConnection extends Connection implements IConnectionSingle {
$value = '';
do {
$chunk = fgets($socket);
if ($chunk === false || strlen($chunk) == 0) {
if ($chunk === false || $chunk === '') {
$this->onCommunicationException('Error while reading line from the server');
}
$value .= $chunk;