Skip to content

Bind BedEncoder lifetime to the plink-server connection#11

Merged
jeromekelleher merged 1 commit intosgkit-dev:mainfrom
jeromekelleher:improve-lifetime
May 7, 2026
Merged

Bind BedEncoder lifetime to the plink-server connection#11
jeromekelleher merged 1 commit intosgkit-dev:mainfrom
jeromekelleher:improve-lifetime

Conversation

@jeromekelleher
Copy link
Copy Markdown
Member

Replace the lazy-allocate-on-first-READ + manual try/finally cleanup in _handle_connection with an upfront BedEncoder construction wrapped in a with block. If construction fails the server now writes an errno reply on the socket (via pack_error_reply) before returning, so the parent FUSE layer surfaces a real OSError rather than an unexplained EOF. Adds tests covering both the matching-errno and EIO-fallback paths.

Replace the lazy-allocate-on-first-READ + manual try/finally cleanup
in `_handle_connection` with an upfront BedEncoder construction wrapped
in a `with` block. If construction fails the server now writes an
errno reply on the socket (via `pack_error_reply`) before returning,
so the parent FUSE layer surfaces a real `OSError` rather than an
unexplained EOF. Adds tests covering both the matching-errno and
EIO-fallback paths.
@jeromekelleher jeromekelleher merged commit 76f1470 into sgkit-dev:main May 7, 2026
5 checks passed
@jeromekelleher jeromekelleher deleted the improve-lifetime branch May 7, 2026 10:11
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.

1 participant