Skip to content

lib/model: Ensure index handler stops on closed connection (fixes #9021) - #9035

Closed
imsodin wants to merge 2 commits into
syncthing:mainfrom
imsodin:model/indexhandler-lifetime
Closed

imsodin wants to merge 2 commits into
syncthing:mainfrom
imsodin:model/indexhandler-lifetime

Conversation

@imsodin

@imsodin imsodin commented Aug 12, 2023

Copy link
Copy Markdown
Member

The current life-time handling of an index handler is both convoluted and there's no check that it is stopped when the model cleans up connection resources (including the index handler).

@calmh

calmh commented Aug 16, 2023 •

Copy link
Copy Markdown
Member

I have a slightly different take on this. The way the index handler registry takes the parent Supervisor as a parameter and manipulates that is super funky, I think it should rather be a Supervisor and act accordingly, being stopped/removed by the model when the connection closes. I will file a comparison PR for discussion.

@imsodin

imsodin commented Aug 16, 2023

Copy link
Copy Markdown
Member Author

I think I get what you are proposing - makes sense. I think it should expose a (suture) service though, not a supervisor, as it shouldn't be used as a supervisor (except internally).

@calmh

calmh commented Aug 16, 2023

Copy link
Copy Markdown
Member

Right, yes.

@imsodin

imsodin commented Aug 16, 2023

Copy link
Copy Markdown
Member Author

Did you already do/implement it or do you want me to update this PR?

@calmh

calmh commented Aug 16, 2023

Copy link
Copy Markdown
Member

#9038

…cthing#9021)

The current life-time handling of an index handler is both convoluted
and there's no check that it is stopped when the model cleans up
connection resources (including the index handler).
@imsodin
imsodin force-pushed the model/indexhandler-lifetime branch from 9c5753f to 5467d8d Compare August 19, 2023 08:45
@imsodin imsodin closed this Aug 21, 2023
@imsodin
imsodin deleted the model/indexhandler-lifetime branch August 21, 2023 16:11
@st-review st-review added the frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion label Aug 20, 2024
@syncthing syncthing locked and limited conversation to collaborators Aug 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants