Permalink
Browse files

Moved socket creation out of common path (https://issues.jboss.org/br…

  • Loading branch information...
1 parent b9d3e8d commit e19fc099915d6065366334f247f4ac9757c59efc Bela Ban committed May 14, 2012
Showing with 8 additions and 2 deletions.
  1. +8 −2 src/org/jgroups/protocols/UDP.java
@@ -221,8 +221,14 @@ protected void _send(InetAddress dest, int port, boolean mcast, byte[] data, int
* Creates the unicast and multicast sockets and starts the unicast and multicast receiver threads
*/
public void start() throws Exception {
- createSockets();
- super.start();
+ try {
+ createSockets();
+ super.start();
+ }
+ catch(Exception ex) {
+ destroySockets();
+ throw ex;
+ }
ucast_receiver=new PacketReceiver(sock,
"unicast receiver",
new Runnable() {

0 comments on commit e19fc09

Please sign in to comment.