Skip to content

update referenceCount log #4682

@haiyang1985

Description

@haiyang1985
  • 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();
	    }
	}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions