Skip to content

Commit 7cdbb88

Browse files
committed
add CHANGELOG
1 parent 3405de8 commit 7cdbb88

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
### 2026-05-26
3+
4+
- client/udp.js refactors
5+
1. Mismatched ids are dropped and the listener keeps waiting — stray packets no longer crash the process.
6+
2. Sender filtering. Reject any packet whose rinfo.port isn't the configured resolver port; additionally enforce rinfo.address when dns is an IP literal (using net.isIP).
7+
3. Defensive Packet.parse. Wrapped in try/catch so a malformed stray packet doesn't reject the promise — it's dropped with a debug log.
8+
4. Timeout. New timeout option (default 10s, set 0 to disable). On expiry the promise rejects with code: 'ETIMEDOUT'. Timer is .unref()-ed so it never holds the event loop open.
9+
5. Full 16-bit transaction IDs. query.header.id = crypto.randomInt(0x10000), 6.5× the keyspace and uses a CSPRNG.
10+
6. Proper cleanup. Single cleanup() clears the timer, removes both listeners, and closes the socket; settled guard prevents double-resolve/reject from racing message + timeout.
11+
7. Error event handled. Socket errors now reject the promise instead of going unhandled.
12+

0 commit comments

Comments
 (0)