@Override public String telnet(Channel channel, String message) { channel.close(); return null; }
@Override public String telnet(Channel channel, String message) { channel.close(); return null; }
@Override public void close(int timeout) { channel.close(timeout); }
@Override public void close(int timeout) { channel.close(timeout); }
@Override public void close() { channel.close(); }
@Override public void close() { channel.close(); }
@Override public void close() { channel.close(); }
@Override public void close() { channel.close(); }
@Override public void close() { try { channel.close(); } catch (Throwable e) { logger.warn(e.getMessage(), e); } }
@Override public void close() { try { channel.close(); } catch (Throwable e) { logger.warn(e.getMessage(), e); } }
public void disconnect() { connectLock.lock(); try { try { Channel channel = getChannel(); if (channel != null) { channel.close(); } } catch (Throwable e) { logger.warn(e.getMessage(), e); } try { doDisConnect(); } catch (Throwable e) { logger.warn(e.getMessage(), e); } } finally { connectLock.unlock(); } }
public void disconnect() { connectLock.lock(); try { try { Channel channel = getChannel(); if (channel != null) { channel.close(); } } catch (Throwable e) { logger.warn(e.getMessage(), e); } try { doDisConnect(); } catch (Throwable e) { logger.warn(e.getMessage(), e); } } finally { connectLock.unlock(); } }
for (org.apache.dubbo.remoting.Channel channel : channels) { try { channel.close(); } catch (Throwable e) { logger.warn(e.getMessage(), e);
@Override public void connected(Channel ch) throws RemotingException { // If the server has entered the shutdown process, reject any new connection if (this.isClosing() || this.isClosed()) { logger.warn("Close new channel " + ch + ", cause: server is closing or has been closed. For example, receive a new connect request while in shutdown process."); ch.close(); return; } Collection<Channel> channels = getChannels(); if (accepts > 0 && channels.size() > accepts) { logger.error("Close channel " + ch + ", cause: The server " + ch.getLocalAddress() + " connections greater than max config " + accepts); ch.close(); return; } super.connected(ch); }
@Override public void connected(Channel ch) throws RemotingException { // If the server has entered the shutdown process, reject any new connection if (this.isClosing() || this.isClosed()) { logger.warn("Close new channel " + ch + ", cause: server is closing or has been closed. For example, receive a new connect request while in shutdown process."); ch.close(); return; } Collection<Channel> channels = getChannels(); if (accepts > 0 && channels.size() > accepts) { logger.error("Close channel " + ch + ", cause: The server " + ch.getLocalAddress() + " connections greater than max config " + accepts); ch.close(); return; } super.connected(ch); }
for (org.apache.dubbo.remoting.Channel channel : channels) { try { channel.close(); } catch (Throwable e) { logger.warn(e.getMessage(), e);
for (org.apache.dubbo.remoting.Channel channel : channels) { try { channel.close(); } catch (Throwable e) { logger.warn(e.getMessage(), e);
@Override protected void doTask(Channel channel) { try { Long lastRead = lastRead(channel); Long lastWrite = lastWrite(channel); Long now = now(); // check ping & pong at server if ((lastRead != null && now - lastRead > idleTimeout) || (lastWrite != null && now - lastWrite > idleTimeout)) { logger.warn("Close channel " + channel + ", because idleCheck timeout: " + idleTimeout + "ms"); channel.close(); } } catch (Throwable t) { logger.warn("Exception when close remote channel " + channel.getRemoteAddress(), t); } } }
@Override protected void doTask(Channel channel) { try { Long lastRead = lastRead(channel); Long lastWrite = lastWrite(channel); Long now = now(); // check ping & pong at server if ((lastRead != null && now - lastRead > idleTimeout) || (lastWrite != null && now - lastWrite > idleTimeout)) { logger.warn("Close channel " + channel + ", because idleCheck timeout: " + idleTimeout + "ms"); channel.close(); } } catch (Throwable t) { logger.warn("Exception when close remote channel " + channel.getRemoteAddress(), t); } } }