mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
if sub server cannot be bound, log it as warning
This commit is contained in:
@@ -33,6 +33,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.ide.PooledThreadExecutor;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.BindException;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.Socket;
|
||||
|
||||
@@ -93,7 +94,8 @@ public final class NettyUtil {
|
||||
}
|
||||
|
||||
return (throwable instanceof IOException && message.equals("An existing connection was forcibly closed by the remote host")) ||
|
||||
(throwable instanceof ChannelException && message.startsWith("Failed to bind to: "));
|
||||
(throwable instanceof ChannelException && message.startsWith("Failed to bind to: ")) ||
|
||||
throwable instanceof BindException;
|
||||
}
|
||||
|
||||
// applicable only in case of ClientBootstrap&OioClientSocketChannelFactory
|
||||
|
||||
@@ -47,8 +47,12 @@ final class SubServer implements CustomPortServerManager.CustomPortService, Disp
|
||||
return true;
|
||||
}
|
||||
catch (Exception e) {
|
||||
NettyUtil.log(e, BuiltInServer.LOG);
|
||||
user.cannotBind(e, port);
|
||||
try {
|
||||
NettyUtil.log(e, BuiltInServer.LOG);
|
||||
}
|
||||
finally {
|
||||
user.cannotBind(e, port);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user