in dubbo-remoting-extensions/dubbo-remoting-p2p/src/main/java/org/apache/dubbo/remoting/p2p/support/ServerPeer.java [99:122]
public void send(Object message, boolean sent) throws RemotingException {
Throwable last = null;
try {
super.send(message, sent);
} catch (Throwable t) {
last = t;
}
for (Client client : clients.values()) {
try {
client.send(message, sent);
} catch (Throwable t) {
last = t;
}
}
if (last != null) {
if (last instanceof RemotingException) {
throw (RemotingException) last;
} else if (last instanceof RuntimeException) {
throw (RuntimeException) last;
} else {
throw new RuntimeException(last.getMessage(), last);
}
}
}