MCPcopy Create free account
hub / github.com/apache/impala / IsConnResetTException

Function IsConnResetTException

be/src/rpc/thrift-util.cc:312–321  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

310}
311
312bool 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
323int64_t ThriftInternalRpcMaxMessageSize() {
324 return FLAGS_thrift_rpc_max_message_size <= 0 ? ThriftDefaultMaxMessageSize() :

Callers 1

DoRpcMethod · 0.85

Calls 1

getTypeMethod · 0.65

Tested by

no test coverage detected