| 310 | } |
| 311 | |
| 312 | bool IsConnResetTException(const TTransportException& e) { |
| 313 | // Strings taken from TTransport::readAll(). This happens iff TSocket::read() returns 0. |
| 314 | // As readAll() is reading non-zero length payload, this can only mean recv() called |
| 315 | // by read() returns 0. According to man page of recv(), this implies a stream socket |
| 316 | // peer has performed an orderly shutdown. |
| 317 | return (e.getType() == TTransportException::END_OF_FILE && |
| 318 | strstr(e.what(), "No more data to read.") != nullptr) || |
| 319 | (e.getType() == TTransportException::INTERNAL_ERROR && |
| 320 | strstr(e.what(), "SSL_read: Connection reset by peer") != nullptr); |
| 321 | } |
| 322 | |
| 323 | int64_t ThriftInternalRpcMaxMessageSize() { |
| 324 | return FLAGS_thrift_rpc_max_message_size <= 0 ? ThriftDefaultMaxMessageSize() : |