Skip to content

Fix pglite-socket maxConnections JSDoc default (1, not 100)#980

Merged
tdrz merged 1 commit intoelectric-sql:mainfrom
bahoo:fix/socket-server-maxconn-jsdoc-default
May 6, 2026
Merged

Fix pglite-socket maxConnections JSDoc default (1, not 100)#980
tdrz merged 1 commit intoelectric-sql:mainfrom
bahoo:fix/socket-server-maxconn-jsdoc-default

Conversation

@bahoo
Copy link
Copy Markdown
Contributor

@bahoo bahoo commented Apr 29, 2026

Tiny one: fixes a stale JSDoc in pglite-socket. The doc on PGLiteSocketServerOptions.maxConnections claims (default: 100), but the constructor actually defaults to 1. Three nearby spots agree the real default is 1:

  • src/index.ts:572this.maxConnections = options.maxConnections ?? 1
  • src/scripts/server.ts:67 — CLI flag default: '1'
  • src/scripts/server.ts:94 — help text --max-connections=N ... (default is no concurrency: 1)

#902 later locked in the same wording across the README, so 1 is clearly the intended story — the JSDoc just needs to be brought up to speed, too. And both the docstring and the runtime default went in together in #873, so this is a same-PR typo rather than drift over time.

To reproduce:

const s = new PGLiteSocketServer({ db, path: '/tmp/foo' })
console.log(s.getStats().maxConnections) // → 1, not 100

Hope it saves the next person a head-scratch.

@tdrz tdrz merged commit 791fbc7 into electric-sql:main May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants