GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Clear all timeout on destroy and close (#2535) · nodejs/undici@a1a8136

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib
    • agent.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/agent.js‎

Copy file name to clipboardExpand all lines: lib/agent.js
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ class Agent extends DispatcherBase {
110110
async [kClose] () {
111111
const closePromises = []
112112
for (const client of this[kClients].values()) {
113+
if (client[kDeleteScheduled]) {
114+
clearTimeout(client[kDeleteScheduled])
115+
}
113116
closePromises.push(client.close())
114117
}
115118
this[kClients].clear()
@@ -120,6 +123,9 @@ class Agent extends DispatcherBase {
120123
async [kDestroy] (err) {
121124
const destroyPromises = []
122125
for (const client of this[kClients].values()) {
126+
if (client[kDeleteScheduled]) {
127+
clearTimeout(client[kDeleteScheduled])
128+
}
123129
destroyPromises.push(client.destroy(err))
124130
}
125131
this[kClients].clear()

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.