Permalink
Browse files

fixed NoRouteToHost issue (https://jira.jboss.org/browse/JGRP-1254)

  • Loading branch information...
Bela Ban
Bela Ban committed Nov 25, 2010
1 parent c66bda1 commit 161ff2173f39821027e564d4fddb575e8871cb4b
Showing with 15 additions and 2 deletions.
  1. +15 −2 src/org/jgroups/protocols/UDP.java
@@ -342,14 +342,27 @@ private void _send(InetAddress dest, int port, boolean mcast, byte[] data, int o
try {
s.send(packet);
}
+ // solve reconnection issue with Windows (https://jira.jboss.org/browse/JGRP-1254)
+ catch(NoRouteToHostException e){
+ log.warn(e.getMessage() +", reset interface");
+ s.setInterface(s.getInterface());
+ }
catch(Exception e) {
log.error("failed sending packet on socket " + s);
}
}
}
else { // DEFAULT path
- if(mcast_sock != null)
- mcast_sock.send(packet);
+ if(mcast_sock != null) {
+ try {
+ mcast_sock.send(packet);
+ }
+ // solve reconnection issue with Windows (https://jira.jboss.org/browse/JGRP-1254)
+ catch(NoRouteToHostException e){
+ log.warn(e.getMessage() +", reset interface");
+ mcast_sock.setInterface(mcast_sock.getInterface());
+ }
+ }
}
}
else {

0 comments on commit 161ff21

Please sign in to comment.