| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 307e43d commit b12204e
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -24,14 +24,14 @@ const common = require('../common'); | |||
| 24 | 24 | const assert = require('assert'); | |
| 25 | 25 | const net = require('net'); | |
| 26 | 26 | ||
| 27 | - const server = net.createServer(common.mustCall(function(s) { | ||
| 27 | + const server = net.createServer(common.mustCall((s) => { | ||
| 28 | 28 | console.error('SERVER: got connection'); | |
| 29 | 29 | s.end(); | |
| 30 | 30 | })); | |
| 31 | 31 | ||
| 32 | - server.listen(0, common.mustCall(function() { | ||
| 33 | - const c = net.createConnection(this.address().port); | ||
| 34 | - c.on('close', common.mustCall(function() { | ||
| 32 | + server.listen(0, common.mustCall(() => { | ||
| 33 | + const c = net.createConnection(server.address().port); | ||
| 34 | + c.on('close', common.mustCall(() => { | ||
| 35 | 35 | console.error('connection closed'); | |
| 36 | 36 | assert.strictEqual(c._handle, null); | |
| 37 | 37 | // Calling functions / accessing properties of a closed socket should not | |
| Back | FazBrowse Home | New Git URL |
0 commit comments