zrlw edited a comment on pull request #8872:
URL: https://github.com/apache/dubbo/pull/8872#issuecomment-924964900
i debug ReferenceCountExchangeClientTest test_counter_error() as junit test,
it showed that:
```
client.close(); <== call HeaderExchangeChannel close() !!!
// client has been replaced with lazy client. lazy client is fetched
from referenceclientmap, and since it's
// been invoked once, it's close status is false
Assertions.assertFalse(client.isClosed(), "client status close");
Assertions.assertFalse(helloServiceInvoker.isAvailable(), "client
status close");
destoy(); <== will call HeaderExchangeChannel close(int timeout)
```
HeaderExchangeChannel close() method will be called at the last
client.close() in test_counter_error(), closed variable should not set true at
HeaderExchangeChannel close(), otherwise the status of the invoker will keep
available.
if closed value keep false, HeaderExchangeChannel close(int timeout) will
be called at destroy(), the last statement in test_counter_error().
maybe HeaderExchangeChannel close() should like current branch 3.0:
```
@Override
public void close() {
try {
// graceful close
DefaultFuture.closeChannel(channel);
channel.close();
} catch (Throwable e) {
logger.warn(e.getMessage(), e);
}
}
```
--
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]