thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Schlangen <>
Subject AW: Re: AW: Re: ECONNRESET errors
Date Fri, 08 May 2009 21:05:14 GMT

the problem disappears if you define __FreeBSD__ in TSocket.cpp and change  

  virtual bool peek() {
    /* shigin: see THRIFT-96 discussion */
    if (rBase_ == rBound_) {
      setReadBuffer(rBuf_.get(), transport_->read(rBuf_.get(), rBufSize_));
    return (rBound_ > rBase_);


  virtual bool peek() {
    return (rBound_ > rBase_ || transport_->peek());

in TBufferTransports.h

I don't know if this really fixes the issue or just hides it and I don't know if I break anything
by making this change as I don't fully understand the code.

I guess that MacOS's recv() implementation issues ECONNRESET the second time it is called
on a closed socket.
I'm going to test that.


View raw message