Skip to content

Commit

Permalink
apache#2762: [Dubbo - qos-http] stopServer should be invoked ? (apac…
Browse files Browse the repository at this point in the history
  • Loading branch information
beiwei30 authored and CrazyHZM committed Dec 6, 2018
1 parent ecbdc05 commit 2356420
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,10 @@ public <T> Invoker<T> refer(Class<T> type, URL url) throws RpcException {
@Override
public void destroy() {
protocol.destroy();
stopServer();
}

private void startQosServer(URL url) {
if (!hasStarted.compareAndSet(false, true)) {
return;
}

try {
boolean qosEnable = url.getParameter(QOS_ENABLE,true);
if (!qosEnable) {
Expand All @@ -91,6 +88,10 @@ private void startQosServer(URL url) {
return;
}

if (!hasStarted.compareAndSet(false, true)) {
return;
}

int port = url.getParameter(QOS_PORT, QosConstants.DEFAULT_PORT);
boolean acceptForeignIp = Boolean.parseBoolean(url.getParameter(ACCEPT_FOREIGN_IP,"false"));
Server server = Server.getInstance();
Expand Down

0 comments on commit 2356420

Please sign in to comment.