Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

got no error log when giving a wrong ip or port #3532

Open
iiibui opened this issue Dec 22, 2021 · 0 comments
Open

got no error log when giving a wrong ip or port #3532

iiibui opened this issue Dec 22, 2021 · 0 comments
Labels
community Source: who proposed the issue priority/low-pri Priority: low type/enhancement Type: make the code neat or more efficient

Comments

@iiibui
Copy link

iiibui commented Dec 22, 2021

I think it's better to check if socket error before newChannel since there is no exception cause by socket connect:

evb->runImmediatelyOrRunInEventBaseThreadAndWait([this, &socket, evb, resolved]() {
if (enableSSL_) {
socket = folly::AsyncSSLSocket::newSocket(nebula::createSSLContext(), evb);
socket->connect(nullptr, resolved.host, resolved.port, FLAGS_conn_timeout_ms);
} else {
socket =
folly::AsyncSocket::newSocket(evb, resolved.host, resolved.port, FLAGS_conn_timeout_ms);
}
});
auto headerClientChannel = apache::thrift::HeaderClientChannel::newChannel(socket);

It's a bit difficult to locate the problem when the --meta_server_addrs configuration is wrong.

@Sophie-Xie Sophie-Xie added the type/enhancement Type: make the code neat or more efficient label Dec 23, 2021
@Sophie-Xie Sophie-Xie added the community Source: who proposed the issue label Mar 30, 2022
@MuYiYong MuYiYong added the priority/low-pri Priority: low label Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Source: who proposed the issue priority/low-pri Priority: low type/enhancement Type: make the code neat or more efficient
Projects
None yet
Development

No branches or pull requests

3 participants