Skip to content

Prevent multiple closes #191

@ash2k

Description

@ash2k

AsyncHttpClient.close() and NettyAsyncHttpProvider.close() (and probably other providers) should prevent multiple invocations by using CAS like this:

if (isClosed.compareAndSet(false, true) {
    // release resources
}

p.s. also AsyncHttpClient.closeAsynchronously() can just delegate to AsyncHttpClient.this.close() from Runnable.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions