-
Notifications
You must be signed in to change notification settings - Fork 48
fix: read full response body and close connections to avoid file desc… #209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -14,6 +14,7 @@ import ( | |||
"encoding/base64" | |||
"encoding/json" | |||
"fmt" | |||
"io" | |||
"net/http" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are 4 places in this file where we call Client.Do
. We should be sure to fix all of them. Esp start/end invocation and flush.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flush is a local test thing only, I don't actually think it works anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not what I'm seeing at
datadog-lambda-go/internal/trace/listener.go
Line 128 in 39ee88f
tracer.Flush() |
We call Flush every time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably the better thing to do is what you are saying, ensure the Flush call only happens when local testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the tracer flush, not calling the flush endpoint on the extension
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh duh, thank you
…riptor leakage
What does this PR do?
Reads the full response and closes the connection to prevent the server from holding the connection open
Motivation
Testing Guidelines
Additional Notes
Types of changes
Checklist