You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Alexander Shigin (JIRA)" <ji...@apache.org> on 2008/07/25 16:55:31 UTC
[jira] Updated: (THRIFT-96) TSocket.peek fails on FreeBSD
[ https://issues.apache.org/jira/browse/THRIFT-96?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexander Shigin updated THRIFT-96:
-----------------------------------
Attachment: thrift-peek-fix.patch
http://git.thrift-rpc.org/?p=thrift.git;a=shortlog;h=refs/heads/pri/shigin/peek
There is two changes:
* create new TUnderlyingTransport to share common code with TBufferedTransport and TFramedTransport. The change need because TBufferedTransport doesn't call peek of underlying transport.
* fix TSocket.peek for freebsd.
> TSocket.peek fails on FreeBSD
> -----------------------------
>
> Key: THRIFT-96
> URL: https://issues.apache.org/jira/browse/THRIFT-96
> Project: Thrift
> Issue Type: Bug
> Components: Library (C++)
> Reporter: Alexander Shigin
> Attachments: thrift-peek-fix.patch
>
>
> POSIX says what recv(2) should returns 0 if peer has performed a shutdown. This feature uses in TBufferedTransport
> {code}
> bool peek() {
> if (rBase_ == rBound_) {
> setReadBuffer(rBuf_.get(), transport_->read(rBuf_.get(), rBufSize_));
> }
> return (rBound_ > rBase_);
> }
> {code}
> The decision works fine on linux, but fails on freebsd. In freebsd, recv returns -1 and errno==ECONNRESET.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.