We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b6e430 commit b66e082Copy full SHA for b66e082
apm-agent-core/src/main/java/co/elastic/apm/report/ApmServerHttpPayloadSender.java
@@ -87,7 +87,6 @@ public void writeTo(BufferedSink sink) throws IOException {
87
payloadSerializer.serializePayload(os, payload);
88
} finally {
89
os.close();
90
- payload.recycle();
91
}
92
93
})
@@ -109,6 +108,8 @@ public void writeTo(BufferedSink sink) throws IOException {
109
108
} catch (IOException e) {
110
logger.debug("Sending payload to APM server failed", e);
111
dropped += payload.getPayloadObjects().size();
+ } finally {
112
+ payload.recycle();
113
114
115
0 commit comments