Changeset View
Changeset View
Standalone View
Standalone View
src/channel/PhutilChannel.php
Context not available. | |||||
public function update() { | public function update() { | ||||
$maximum_read = PHP_INT_MAX; | $maximum_read = PHP_INT_MAX; | ||||
if ($this->readBufferSize !== null) { | if ($this->readBufferSize !== null) { | ||||
$maximum_read = ($this->readBufferSize - strlen($this->ibuf)); | $maximum_read = ($this->readBufferSize - @strlen($this->ibuf)); | ||||
} | } | ||||
while ($maximum_read > 0) { | while ($maximum_read > 0) { | ||||
$in = $this->readBytes($maximum_read); | $in = $this->readBytes($maximum_read); | ||||
if (!strlen($in)) { | if (!@strlen($in)) { | ||||
// Reading is blocked for now. | // Reading is blocked for now. | ||||
break; | break; | ||||
} | } | ||||
$this->ibuf .= $in; | $this->ibuf .= $in; | ||||
$maximum_read -= strlen($in); | $maximum_read -= @strlen($in); | ||||
} | } | ||||
while ($this->obuf->getByteLength()) { | while ($this->obuf->getByteLength()) { | ||||
Context not available. | |||||
* @task impl | * @task impl | ||||
*/ | */ | ||||
public function isReadBufferEmpty() { | public function isReadBufferEmpty() { | ||||
return (strlen($this->ibuf) == 0); | return (@strlen($this->ibuf) == 0); | ||||
} | } | ||||
Context not available. |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0