Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update referenceCount log #4682

Closed
2 tasks done
haiyang1985 opened this issue Jul 29, 2019 · 0 comments
Closed
2 tasks done

update referenceCount log #4682

haiyang1985 opened this issue Jul 29, 2019 · 0 comments

Comments

@haiyang1985
Copy link
Member

haiyang1985 commented Jul 29, 2019

  • I have searched the issues of this repository and believe that this is not a duplicate.
  • I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

  • Dubbo version: 2.7.3
  • Operating System version: MacOs
  • Java version: 1.8

Steps to reproduce this issue

This is not the issue, but the update of referenceCount log.

Originally, i don't know why we have to check the referenceCount before close the connection.

final class ReferenceCountExchangeClient implements ExchangeClient {
	@Override
	public void close(int timeout) {
	    if (referenceCount.decrementAndGet() <= 0) {
	        if (timeout == 0) {
	            client.close();

	        } else {
	            client.close(timeout);
	        }

	        replaceWithLazyClient();
	    }
	}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants