Skip to content

Comments

Improve reconnection code and remove configurable timeouts#5

Merged
tom-james-watson merged 1 commit intomainfrom
refactor/improve-reconnections
Feb 18, 2026
Merged

Improve reconnection code and remove configurable timeouts#5
tom-james-watson merged 1 commit intomainfrom
refactor/improve-reconnections

Conversation

@tom-james-watson
Copy link
Collaborator

Removes the ability to configure a timeout, because agents are just always unnecessarily sending it. A hard limit of 10 minutes is probably fine.

Also moves the reconnection code around to get it out of the router and make it a little more cleaner. Also fixes a potential issue where parallel reconnections are attempted by reusing the same reconnection promise.

@tom-james-watson tom-james-watson requested review from elmarburke and removed request for elmarburke February 18, 2026 15:56
@tom-james-watson tom-james-watson marked this pull request as draft February 18, 2026 15:56
@tom-james-watson tom-james-watson force-pushed the refactor/improve-reconnections branch from d1abe71 to e254450 Compare February 18, 2026 16:05
@tom-james-watson tom-james-watson force-pushed the refactor/improve-reconnections branch from e254450 to 7faa296 Compare February 18, 2026 16:05
@tom-james-watson tom-james-watson marked this pull request as ready for review February 18, 2026 16:13
Comment on lines +203 to +209
export async function executeWithReconnect(
session: Session,
framer: Framer,
code: string,
options: ExecuteOptions,
reconnect: () => Promise<Framer | null>,
): Promise<ExecuteResult> {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: make this an object, so the reconnect becomes labeled in usage
(low prio, because the reconnect has reconnect() in it)

@tom-james-watson tom-james-watson merged commit 5f47c15 into main Feb 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants