[
https://issues.apache.org/jira/browse/THRIFT-4354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16190312#comment-16190312
]
ASF GitHub Bot commented on THRIFT-4354:
----------------------------------------
GitHub user RobberPhex opened a pull request:
https://github.com/apache/thrift/pull/1384
THRIFT-4354 TSocket block on read
ref <https://issues.apache.org/jira/browse/THRIFT-4354>
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/RobberPhex/thrift THRIFT-4354
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/thrift/pull/1384.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1384
----
commit 0b8c5d42b78f6a9271b8b30e53351004feddb65a
Author: Robert Lu <[email protected]>
Date: 2017-10-03T20:28:00Z
add non-block
----
> TSocket block on read
> ---------------------
>
> Key: THRIFT-4354
> URL: https://issues.apache.org/jira/browse/THRIFT-4354
> Project: Thrift
> Issue Type: Bug
> Components: PHP - Library
> Affects Versions: 0.9.3, 0.10.0
> Environment: php7.0 + macOS
> Reporter: Robert Lu
> Assignee: Robert Lu
>
> When \Thrift\Transport\TSocket::read is called, it will block until receive
> $len
> byte([TSocket.php#L273-L276|https://github.com/apache/thrift/blob/master/lib/php/lib/Thrift/Transport/TSocket.php#L273-L276])
> But, sometimes, other call TSocket::read with large length,
> such as
> [TBufferedTransport|https://github.com/apache/thrift/blob/39310dad793ca69b4b7217a3b54430e682e5e2a4/lib/php/lib/Thrift/Transport/TBufferedTransport.php#L136-L138]:
> {code}
> if (TStringFuncFactory::create()->strlen($this->rBuf_) === 0) {
> $this->rBuf_ = $this->transport_->read($this->rBufSize_);
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)