| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 90219c3 commit 443d046
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,16 +1,13 @@ | |||
| 1 | 1 | 'use strict'; | |
| 2 | - var common = require('../common'); | ||
| 3 | - | ||
| 4 | - var dgram = require('dgram'); | ||
| 5 | - var client, timer, buf; | ||
| 2 | + const common = require('../common'); | ||
| 3 | + const dgram = require('dgram'); | ||
| 6 | 4 | ||
| 7 | 5 | if (process.platform === 'darwin') { | |
| 8 | 6 | console.log('1..0 # Skipped: because of 17894467 Apple bug'); | |
| 9 | 7 | return; | |
| 10 | 8 | } | |
| 11 | 9 | ||
| 12 | - | ||
| 13 | - client = dgram.createSocket('udp4'); | ||
| 10 | + const client = dgram.createSocket('udp4'); | ||
| 14 | 11 | ||
| 15 | 12 | client.bind(common.PORT); | |
| 16 | 13 | ||
@@ -19,9 +16,9 @@ client.on('message', function(buffer, bytes) { | |||
| 19 | 16 | client.close(); | |
| 20 | 17 | }); | |
| 21 | 18 | ||
| 22 | - buf = new Buffer(0); | ||
| 19 | + const buf = new Buffer(0); | ||
| 23 | 20 | client.send(buf, 0, 0, common.PORT, '127.0.0.1', function(err, len) { }); | |
| 24 | 21 | ||
| 25 | - timer = setTimeout(function() { | ||
| 22 | + const timer = setTimeout(function() { | ||
| 26 | 23 | throw new Error('Timeout'); | |
| 27 | - }, 200); | ||
| 24 | + }, common.platformTimeout(200)); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments