nulinuli-nuli commented on issue #13539:
URL: https://github.com/apache/dubbo/issues/13539#issuecomment-1863762703
这段代码应该是优雅停机的实现,但是对于参数回调方法好像不支持,因为参数回调方法,首先是客户端调用服务端,服务端随后再主动调用客户端。
// graceful close
@Override
public void close(int timeout) {
if (closed) {
return;
}
closed = true;
if (timeout > 0) {
long start = System.currentTimeMillis();
while (DefaultFuture.hasFuture(channel)
&& System.currentTimeMillis() - start < timeout) {
try {
Thread.sleep(10);
} catch (InterruptedException e) {
logger.warn(e.getMessage(), e);
}
}
}
close();
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]