Commit fe9c206
committed
fix(transport): refs PerryTS/perry#536 — call net.createConnection(port, host) on Perry, not (host, port)
The perry path of `openSocket` swapped Node's positional argument order
based on a mistaken assertion in the file header. Perry's
`net.createConnection` has always matched Node's documented
`(port[, host][, connectListener])` — see
`crates/perry-codegen/src/lower_call.rs` (NA_F64 first, NA_STR
second) in the perry tree. Under the wrong order Perry coerced the
host string to a port (NaN-coerced) and the port number to a host
pointer, returning an invalid socket handle that silently no-op'd
through every `sock.on(...)` registration. `await connect(...)` then
never resolved against any MySQL server, surfacing as an immediate
exit with no rows on the bare `await pool.query("SELECT 1 AS n")`
shape from the issue's repro.
Header comment rewritten to reflect Perry's actual `(port, host)`
contract. The Node.js code path is unchanged — Node accepts the
object form `({ host, port })` which the driver already used.
Bumps to 0.1.3 and adds a CHANGELOG entry. After running with
perry >= v0.5.652 (which includes #536's runtime-side fixes for
[].pop()/shift() returning undefined and ext-net active-handles
wiring), the issue's repro now returns the SELECT 1 row end-to-end.1 parent 3d2f729 commit fe9c206
3 files changed
Lines changed: 29 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
3 | 20 | | |
4 | 21 | | |
5 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
55 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
56 | 61 | | |
0 commit comments