| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 0fc33fb commit 91f2cf9
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -238,17 +238,7 @@ function flushStdio(subprocess) { | |||
| 238 | 238 | ||
| 239 | 239 | ||
| 240 | 240 | function createSocket(pipe, readable) { | |
| 241 | - var s = new net.Socket({ handle: pipe }); | ||
| 242 | - | ||
| 243 | - if (readable) { | ||
| 244 | - s.writable = false; | ||
| 245 | - s.readable = true; | ||
| 246 | - } else { | ||
| 247 | - s.writable = true; | ||
| 248 | - s.readable = false; | ||
| 249 | - } | ||
| 250 | - | ||
| 251 | - return s; | ||
| 241 | + return net.Socket({ handle: pipe, readable, writable: !readable }); | ||
| 252 | 242 | } | |
| 253 | 243 | ||
| 254 | 244 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -78,7 +78,7 @@ function onexit() { | |||
| 78 | 78 | // Usually it is just one event, but it can be more. | |
| 79 | 79 | assert.ok(ioEvents >= 3, `at least 3 stdout io events, got ${ioEvents}`); | |
| 80 | 80 | ||
| 81 | - checkInvocations(pipe1, { init: 1, before: 2, after: 2 }, | ||
| 81 | + checkInvocations(pipe1, { init: 1, before: 1, after: 1 }, | ||
| 82 | 82 | 'pipe wrap when sleep.spawn was called'); | |
| 83 | 83 | checkInvocations(pipe2, { init: 1, before: ioEvents, after: ioEvents }, | |
| 84 | 84 | 'pipe wrap when sleep.spawn was called'); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments