| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,17 +20,17 @@ | |||
| 20 | 20 | // USE OR OTHER DEALINGS IN THE SOFTWARE. | |
| 21 | 21 | ||
| 22 | 22 | 'use strict'; | |
| 23 | - require('../common'); | ||
| 23 | + const common = require('../common'); | ||
| 24 | 24 | ||
| 25 | 25 | const http = require('http'); | |
| 26 | 26 | const Countdown = require('../common/countdown'); | |
| 27 | + const MAX_COUNT = 11; | ||
| 27 | 28 | ||
| 28 | - const server = http.createServer(function(req, res) { | ||
| 29 | + const server = http.createServer(common.mustCall(function(req, res) { | ||
| 29 | 30 | res.writeHead(200, { 'Content-Type': 'text/plain' }); | |
| 30 | 31 | res.end('OK'); | |
| 31 | - }); | ||
| 32 | + }, MAX_COUNT)); | ||
| 32 | 33 | ||
| 33 | - const MAX_COUNT = 11; | ||
| 34 | 34 | const agent = new http.Agent({ maxSockets: 1 }); | |
| 35 | 35 | const countdown = new Countdown(MAX_COUNT, () => server.close()); | |
| 36 | 36 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments