| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 2892d15 commit a9c70ce
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1172,6 +1172,7 @@ may run into a 'ECONNRESET' error. | |||
| 1172 | 1172 | ||
| 1173 | 1173 | ```mjs | |
| 1174 | 1174 | import http from 'node:http'; | |
| 1175 | + const agent = new http.Agent({ keepAlive: true }); | ||
| 1175 | 1176 | ||
| 1176 | 1177 | // Server has a 5 seconds keep-alive timeout by default | |
| 1177 | 1178 | http | |
@@ -1193,6 +1194,7 @@ setInterval(() => { | |||
| 1193 | 1194 | ||
| 1194 | 1195 | ```cjs | |
| 1195 | 1196 | const http = require('node:http'); | |
| 1197 | + const agent = new http.Agent({ keepAlive: true }); | ||
| 1196 | 1198 | ||
| 1197 | 1199 | // Server has a 5 seconds keep-alive timeout by default | |
| 1198 | 1200 | http | |
| Back | FazBrowse Home | New Git URL |
0 commit comments