Skip to content

Commit

Permalink
Reverted the isAcceptingData() change (hangs 5.3 and 5.4 on Linux).
Browse files Browse the repository at this point in the history
  • Loading branch information
boenrobot committed Jul 5, 2015
1 parent 92589c9 commit 031fbb6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PEAR2/Net/Transmitter/Stream.php
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,6 @@ public function send($contents, $offset = null, $length = null)
) {
break;
}
$this->isAcceptingData(null);
$bytesNow = @fwrite(
$this->stream,
fread($contents, $chunkSize)
Expand All @@ -331,6 +330,7 @@ public function send($contents, $offset = null, $length = null)
$bytes
);
}
$this->isAcceptingData(null);
}
if ($offsetIsNotNull) {
fseek($contents, $oldPos, SEEK_SET);
Expand All @@ -347,7 +347,6 @@ public function send($contents, $offset = null, $length = null)
}
$bytesToSend = (double) sprintf('%u', strlen($contents));
while ($bytes < $bytesToSend) {
$this->isAcceptingData(null);
$bytesNow = @fwrite(
$this->stream,
substr($contents, $bytes, $chunkSize)
Expand All @@ -362,6 +361,7 @@ public function send($contents, $offset = null, $length = null)
$bytes
);
}
$this->isAcceptingData(null);
}
}
return $bytes;
Expand Down

0 comments on commit 031fbb6

Please sign in to comment.