Skip to content

Commit acaa58e

Browse files
LxxyxTrott
authored andcommitted
http: remove dead code from internal/http.js
PR-URL: #36630 Refs: #32329 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent 4905501 commit acaa58e

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

lib/internal/http.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,20 @@ const {
88
const { setUnrefTimeout } = require('internal/timers');
99
const { PerformanceEntry, notify } = internalBinding('performance');
1010

11-
let nowCache;
1211
let utcCache;
1312

14-
function nowDate() {
15-
if (!nowCache) cache();
16-
return nowCache;
17-
}
18-
1913
function utcDate() {
2014
if (!utcCache) cache();
2115
return utcCache;
2216
}
2317

2418
function cache() {
2519
const d = new Date();
26-
nowCache = d.valueOf();
2720
utcCache = d.toUTCString();
2821
setUnrefTimeout(resetCache, 1000 - d.getMilliseconds());
2922
}
3023

3124
function resetCache() {
32-
nowCache = undefined;
3325
utcCache = undefined;
3426
}
3527

@@ -52,7 +44,6 @@ function emitStatistics(statistics) {
5244
module.exports = {
5345
kOutHeaders: Symbol('kOutHeaders'),
5446
kNeedDrain: Symbol('kNeedDrain'),
55-
nowDate,
5647
utcDate,
5748
emitStatistics
5849
};

0 commit comments

Comments
 (0)