Fix httpasyncclient-4.x-plugin's memory leak risk (#85)

This commit is contained in:
PepoRobert 2021-12-19 15:16:09 +08:00 committed by GitHub
parent ff5de395a0
commit 61e0e6de7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -37,6 +37,7 @@ public class LeaseRequestCompletedInterceptor implements InstanceMethodsAroundIn
conn.getContext().setAttribute(Constants.SKYWALKING_CONTEXT_SNAPSHOT, ContextManager.capture()); conn.getContext().setAttribute(Constants.SKYWALKING_CONTEXT_SNAPSHOT, ContextManager.capture());
conn.getContext().setAttribute(Constants.SKYWALKING_HTTP_CONTEXT, Constants.HTTP_CONTEXT_LOCAL.get()); conn.getContext().setAttribute(Constants.SKYWALKING_HTTP_CONTEXT, Constants.HTTP_CONTEXT_LOCAL.get());
} }
Constants.HTTP_CONTEXT_LOCAL.remove();
} }
@Override @Override

View File

@ -40,6 +40,7 @@ Release Notes.
* Add plugin to support okhttp 2.x * Add plugin to support okhttp 2.x
* Optimize okhttp 3.x 4.x plugin to get span time cost precisely * Optimize okhttp 3.x 4.x plugin to get span time cost precisely
* Adapt message header properties of RocketMQ 4.9.x * Adapt message header properties of RocketMQ 4.9.x
* Fix httpasyncclient-4.x-plugin's memory leak risk
#### Documentation #### Documentation