final EndpointImpl e = endpointRef.getAndSet(null);
if (e != null) {
e.closeComplete();
}
});
<BUG>endpointRef.set(endpoint = new EndpointImpl(xnioWorker, true, endpointName));
</BUG>
} else {
<BUG>endpoint = new EndpointImpl(xnioWorker, false, endpointName);
</BUG>
}

final EndpointImpl e = endpointRef.getAndSet(null);
if (e != null) {
e.closeComplete();
}
});
endpointRef.set(endpoint = new EndpointImpl(xnioWorker, true, endpointName, defaultBindAddress));
} else {
endpoint = new EndpointImpl(xnioWorker, false, endpointName, defaultBindAddress);
}
