| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -83,14 +83,13 @@ const forAllClients = (cb) => common.mustCall(cb, CLIENT_VARIANTS); | |||
| 83 | 83 | path: serverPath | |
| 84 | 84 | }); | |
| 85 | 85 | const getConnectCb = (index) => common.mustCall(function clientOnConnect() { | |
| 86 | - const client = this; | ||
| 87 | 86 | // Test if it's wrapping an existing fd | |
| 88 | 87 | assert(handleMap.has(index)); | |
| 89 | 88 | const oldHandle = handleMap.get(index); | |
| 90 | 89 | assert.strictEqual(oldHandle.fd, this._handle.fd); | |
| 91 | - client.write(String(oldHandle.fd)); | ||
| 90 | + this.write(String(oldHandle.fd)); | ||
| 92 | 91 | console.error(`[Pipe]Sending data through fd ${oldHandle.fd}`); | |
| 93 | - client.on('error', function(err) { | ||
| 92 | + this.on('error', function(err) { | ||
| 94 | 93 | console.error(err); | |
| 95 | 94 | assert.fail(null, null, `[Pipe Client]${err}`); | |
| 96 | 95 | }); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,9 +20,8 @@ const CLIENT_VARIANTS = 12; | |||
| 20 | 20 | }, CLIENT_VARIANTS)) | |
| 21 | 21 | .listen(serverPath, common.mustCall(function() { | |
| 22 | 22 | const getConnectCb = () => common.mustCall(function() { | |
| 23 | - const client = this; | ||
| 24 | - client.end(); | ||
| 25 | - client.on('close', common.mustCall(function() { | ||
| 23 | + this.end(); | ||
| 24 | + this.on('close', common.mustCall(function() { | ||
| 26 | 25 | counter++; | |
| 27 | 26 | if (counter === CLIENT_VARIANTS) { | |
| 28 | 27 | server.close(); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments