Less verbose error message for lookup failure
@@ -26,7 +26,6 @@ import io.netty.buffer.ByteBuf;
import java.net.InetSocketAddress;
import java.net.URI;
-import java.nio.channels.ClosedChannelException;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.CompletableFuture;
@@ -140,8 +139,11 @@ public class BinaryProtoLookupService implements LookupService {
}
}).exceptionally((sendException) -> {
// lookup failed
- log.warn("[{}] failed to send lookup request : {}", topicName.toString(), sendException.getMessage(),
- sendException instanceof ClosedChannelException ? null : sendException);
+ log.warn("[{}] failed to send lookup request : {}", topicName.toString(), sendException.getMessage());
+ if (log.isDebugEnabled()) {
+ log.warn("[{}] Lookup response exception: {}", topicName.toString(), sendException);
+ }
+
addressFuture.completeExceptionally(sendException);
return null;
});
