Skip to content

Commit 8a128a2

Browse files
committed
test something
1 parent 590fe06 commit 8a128a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/dd-trace/src/exporters/common/request.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,14 @@ function request (data, options, callback) {
126126
return callback(null)
127127
}
128128

129-
activeRequests += options.headers['Content-Length']
129+
activeRequests += options.headers['Content-Length'] ?? 0
130130

131131
storage('legacy').run({ noop: true }, () => {
132132
let finished = false
133133
const finalize = () => {
134134
if (finished) return
135135
finished = true
136-
activeRequests -= options.headers['Content-Length']
136+
activeRequests -= options.headers['Content-Length'] ?? 0
137137
}
138138

139139
const req = client.request(options, (res) => onResponse(res, finalize))

0 commit comments

Comments
 (0)