@decentnetwork/peer 0.1.60 → 0.1.61

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/peer.js +8 -0
  2. package/package.json +1 -1
package/dist/peer.js CHANGED
@@ -3247,6 +3247,14 @@ export class Peer {
3247
3247
  resolve();
3248
3248
  });
3249
3249
  });
3250
+ // CRITICAL: a persistent 'error' listener. A TURN send to an
3251
+ // unresolvable host (DNS NXDOMAIN — e.g. tokyo.fi.chat on a box whose
3252
+ // resolver doesn't know it) emits an 'error' on this dgram socket;
3253
+ // with no listener, Node re-throws it as an uncaught exception and
3254
+ // CRASHES THE ENTIRE DAEMON (observed: snoopy repeatedly dying on
3255
+ // "getaddrinfo ENOTFOUND tokyo.fi.chat", which churned every session).
3256
+ // Swallow it — the relay simply won't allocate/relay over this server.
3257
+ sock.on("error", (e) => this.#debugLog(`turn socket error (${srv.host}): ${e.message}`));
3250
3258
  const client = new TurnClient({
3251
3259
  sock,
3252
3260
  creds: { host: srv.host, port: srv.port, realm: "", username: srv.username, password: srv.password }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decentnetwork/peer",
3
- "version": "0.1.60",
3
+ "version": "0.1.61",
4
4
  "description": "Pure TypeScript port of Elastos Carrier (toxcore-derived) P2P messaging. DHT, onion routing, TCP relay, FlatBuffers app payloads, Express offline relay. Wire-compatible with iOS Beagle and the Carrier C SDK.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",