You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "Kikyou1997 (via GitHub)" <gi...@apache.org> on 2023/07/04 03:44:48 UTC
[GitHub] [doris] Kikyou1997 commented on a diff in pull request #21326: [enhancement](nereids) Support or to in conversion
Kikyou1997 commented on code in PR #21326:
URL: https://github.com/apache/doris/pull/21326#discussion_r1251443890
##########
fe/fe-core/src/main/java/org/apache/doris/common/util/NetUtils.java:
##########
@@ -100,30 +97,7 @@ public static String getIpByHost(String host) throws UnknownHostException {
// This is the implementation is inspired by Apache camel project:
public static boolean isPortAvailable(String host, int port, String portName, String suggestion) {
- ServerSocket ss = null;
- DatagramSocket ds = null;
- try {
- ss = new ServerSocket(port);
- ss.setReuseAddress(true);
- ds = new DatagramSocket(port);
- ds.setReuseAddress(true);
- return true;
- } catch (IOException e) {
- LOG.warn("{} {} is already in use. {}", portName, port, suggestion, e);
- } finally {
- if (ds != null) {
- ds.close();
- }
-
- if (ss != null) {
- try {
- ss.close();
- } catch (IOException e) {
- /* should not be thrown */
- }
- }
- }
- return false;
+ return true;
Review Comment:
This is a stupid mistake, sorry.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org