Skip to content

Prevent duplicate connections from repeated Session.open() calls - #23

Merged
HTHou merged 1 commit into
developfrom
fix/session-idempotent-open
Jul 31, 2026
Merged

Prevent duplicate connections from repeated Session.open() calls#23
HTHou merged 1 commit into
developfrom
fix/session-idempotent-open

Conversation

@CritasWang

Copy link
Copy Markdown
Contributor

Summary

  • make Connection.open() return immediately when already connected
  • share an in-flight connection attempt across concurrent open() calls
  • clear the in-flight state after failure so a later open() can retry
  • allow CommonJS imports for generated Thrift modules and use a portable timeout type

Testing

  • npm run test:unit -- --runInBand
  • npm run build
  • npx eslint eslint.config.mjs src/connection/Connection.ts tests/unit/Connection.test.ts (0 errors)

@HTHou
HTHou merged commit 96ba79c into developJul 31, 2026
4 checks passed
Sign up for freeto 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

@CritasWang@HTHou