Complete Relay construction only after container gets server binding
This commit is contained in:
parent
cd5b311dc0
commit
b1ae573f98
|
@ -108,9 +108,6 @@ public class Relay implements Runnable, Node, Flushable {
|
|||
System.err.println("Double bind attempted");
|
||||
} else {
|
||||
_remoteName = m.getBytes(1).getDataString();
|
||||
synchronized (this) {
|
||||
this.notifyAll();
|
||||
}
|
||||
if (_container.bind(_remoteName, this)) {
|
||||
String replySink = m.getBytes(4).getDataString();
|
||||
if (replySink.length() > 0) {
|
||||
|
@ -119,6 +116,9 @@ public class Relay implements Runnable, Node, Flushable {
|
|||
} else {
|
||||
System.err.println("Bind failed: " + _remoteName);
|
||||
}
|
||||
synchronized (this) {
|
||||
this.notifyAll();
|
||||
}
|
||||
}
|
||||
} else if (selector.equals("unsubscribe") && m.size() == 2) {
|
||||
if (!m.getBytes(1).getDataString().equals(_remoteName)) {
|
||||
|
|
Loading…
Reference in New Issue