Files
corescope-rx/package.json
T
efitenandClaude Opus 4.8 bccedfbb84 fix: MQTT connection wedged after one drop, leaving all receptions pending (v1.3.2)
Field report: CoreScope showed disconnected and every reception stayed pending,
starting with today's v1.3.x update. Broker is healthy (auth/ACL/listener all OK),
so the regression is client-side.

Root cause: today's diff lowered MQTT keepalive 60→20 s, which exercises the
reconnect path far more often — and the pre-existing `client.once('error', reject)`
left NO error listener after the first error. mqtt.js is an EventEmitter, so a later
'error' (during a transient reconnect) throws unhandled and wedges the auto-reconnect
loop: the client never reconnects, drain never runs, the queue grows unbounded.

- Revert keepalive to the mqtt.js default (restores v1.2.0 connection behaviour).
- Attach a PERSISTENT 'error' listener; the initial-connect promise removes its own
  listeners once settled so a later error is always handled, never thrown.
- Log every broker transition (connect/reconnect/offline/close/error + reason) to the
  debug log — these were previously invisible, so the drop couldn't be diagnosed.
- "Push pending now" forces a reconnect when the link is down (manual recovery).
- Home upload dot turns red (not idle-grey) on a real disconnect.

SW cache v9→v10.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 18:57:52 +02:00

28 lines
713 B
JSON

{
"name": "coredrive-rx",
"version": "1.3.2",
"private": false,
"license": "GPL-3.0-or-later",
"type": "module",
"description": "Mobile RX coverage capture for CoreScope: BLE companion → MQTT (GPS + SNR/RSSI + multibyte)",
"repository": {
"type": "git",
"url": "git+https://github.com/efiten/coredrive-rx.git"
},
"homepage": "https://github.com/efiten/coredrive-rx#readme",
"bugs": "https://github.com/efiten/coredrive-rx/issues",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"test": "node --test",
"deploy": "bash deploy.sh"
},
"dependencies": {
"mqtt": "^5.10.1"
},
"devDependencies": {
"vite": "^5.4.0"
}
}