Ok, I'm pretty sure my theory is right. Look at this stack trace: at org.apache.http.impl.BHttpConnectionBase.close(BHttpConnectionBase.java:317) at org.apache.http.impl.conn.LoggingManagedHttpCl...
See more...
Ok, I'm pretty sure my theory is right. Look at this stack trace: at org.apache.http.impl.BHttpConnectionBase.close(BHttpConnectionBase.java:317) at org.apache.http.impl.conn.LoggingManagedHttpClientConnection.close(LoggingManagedHttpClientConnection.java:81) at org.apache.http.impl.execchain.ConnectionHolder.releaseConnection(ConnectionHolder.java:103) at org.apache.http.impl.execchain.ConnectionHolder.close(ConnectionHolder.java:156) at org.apache.http.impl.execchain.HttpResponseProxy.close(HttpResponseProxy.java:62) at com.signalfx.signalflow.client.ServerSentEventsTransport$TransportChannel.close(ServerSentEventsTransport.java:385) at com.signalfx.signalflow.client.Computation.close(Computation.java:168) If you use a debugger to print the identity hashcode of the inBuffer variable that is being cleared on that line, you'll see that it is the same object that is later returning -1 bytes read at org.apache.http.impl.io.ChunkedInputStream.getChunkSize(ChunkedInputStream.java:250), which causes the MalformedChunkCodingException. This is a bug in your SDK. Changing TransportChannel's close() method to be more like this seems to fix the problem: public void close() { super.close(); this.streamParser.close(); try { this.response.close(); } catch (IOException ex) { log.error("failed to close response", ex); } try { this.connection.close(); } catch (IOException ex) { log.error("failed to close connection", ex); } } In that case, the wire logger output shows the trailing chunk: 2025-07-01 11:35:52.923 CDT | FINE | org.apache.http.wire | http-outgoing-2 << "event: control-message[\n]" 2025-07-01 11:35:52.923 CDT | FINE | org.apache.http.wire | http-outgoing-2 << "data: {[\n]" 2025-07-01 11:35:52.923 CDT | FINE | org.apache.http.wire | http-outgoing-2 << "data: "event" : "END_OF_CHANNEL",[\n]" 2025-07-01 11:35:52.923 CDT | FINE | org.apache.http.wire | http-outgoing-2 << "data: "timestampMs" : 1751387752387[\n]" 2025-07-01 11:35:52.923 CDT | FINE | org.apache.http.wire | http-outgoing-2 << "data: }[\n]" 2025-07-01 11:35:52.923 CDT | FINE | org.apache.http.wire | http-outgoing-2 << "[\n]" 2025-07-01 11:35:52.923 CDT | FINE | org.apache.http.wire | http-outgoing-2 << "[\r][\n]" 2025-07-01 11:35:52.923 CDT | FINE | org.apache.http.wire | http-outgoing-2 << "0[\r][\n]" 2025-07-01 11:35:52.923 CDT | FINE | org.apache.http.wire | http-outgoing-2 << "[\r][\n]" thanks