git-watchtower 2.1.12 → 2.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/server/web.js +8 -1
package/package.json
CHANGED
package/src/server/web.js
CHANGED
|
@@ -564,7 +564,14 @@ class WebDashboardServer {
|
|
|
564
564
|
try {
|
|
565
565
|
client.write(message);
|
|
566
566
|
} catch (e) {
|
|
567
|
-
//
|
|
567
|
+
// Write failed — proactively prune the dead client instead of
|
|
568
|
+
// waiting for req.on('close') to fire. On abrupt socket resets
|
|
569
|
+
// 'close' can be delayed long enough that subsequent frames
|
|
570
|
+
// hit the same failed write, accumulating exception work and
|
|
571
|
+
// keeping clientCount misleadingly high. Set.delete during
|
|
572
|
+
// iteration is safe; the for-of iterator handles it.
|
|
573
|
+
try { client.end(); } catch (_) { /* already torn down */ }
|
|
574
|
+
this.clients.delete(client);
|
|
568
575
|
}
|
|
569
576
|
}
|
|
570
577
|
}
|