Skip to content

Commit

Permalink
Throws an exception on TUNNEL:TCPGOSSIP (https://jira.jboss.org/jira/…
Browse files Browse the repository at this point in the history
  • Loading branch information
belaban committed Nov 16, 2009
1 parent 08e9238 commit 79a47c3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/org/jgroups/protocols/TCPGOSSIP.java
Expand Up @@ -31,7 +31,7 @@
* FIND_INITIAL_MBRS_OK event up the stack.
*
* @author Bela Ban
* @version $Id: TCPGOSSIP.java,v 1.46 2009/11/05 08:44:50 belaban Exp $
* @version $Id: TCPGOSSIP.java,v 1.47 2009/11/16 09:10:43 belaban Exp $
*/
@DeprecatedProperty(names={"gossip_refresh_rate"})
public class TCPGOSSIP extends Discovery implements RouterStub.ConnectionListener {
Expand Down Expand Up @@ -71,6 +71,12 @@ public void init() throws Exception {
if(timeout <= sock_conn_timeout)
throw new IllegalArgumentException("timeout (" + timeout + ") must be greater than sock_conn_timeout ("
+ sock_conn_timeout + ")");

// we cannot use TCPGOSSIP together with TUNNEL (https://jira.jboss.org/jira/browse/JGRP-1101)
TP transport=getTransport();
if(transport instanceof TUNNEL)
throw new IllegalStateException("TCPGOSSIP cannot be used with TUNNEL; use either TUNNEL:PING or " +
"TCP:TCPGOSSIP as valid configurations");
}

public void start() throws Exception {
Expand Down

0 comments on commit 79a47c3

Please sign in to comment.