# HG changeset patch # User Paul Boddie # Date 1656279874 -7200 # Node ID 7b7a35cc68e6787675c36dac4eb51fc6ba376080 # Parent fe54ff597c1d7c432987c7200811e1a2ff26b189 Added unsubscribe operations when closing pagers to release notifiers. diff -r fe54ff597c1d -r 7b7a35cc68e6 libfsserver/lib/files/file_pager.cc --- a/libfsserver/lib/files/file_pager.cc Sun Jun 26 23:44:09 2022 +0200 +++ b/libfsserver/lib/files/file_pager.cc Sun Jun 26 23:44:34 2022 +0200 @@ -54,9 +54,10 @@ void FilePager::close() { - /* Notify other users of the file. */ + /* Notify other users of the file and unsubscribe. */ _provider->notify_others(_endpoint, NOTIFY_PEER_CLOSED); + unsubscribe(); /* Detach the pager, potentially removing the file provider. */ diff -r fe54ff597c1d -r 7b7a35cc68e6 libfsserver/lib/pipes/pipe_pager.cc --- a/libfsserver/lib/pipes/pipe_pager.cc Sun Jun 26 23:44:09 2022 +0200 +++ b/libfsserver/lib/pipes/pipe_pager.cc Sun Jun 26 23:44:34 2022 +0200 @@ -1,7 +1,7 @@ /* * A pipe pager providing access to pipe content and navigation support. * - * Copyright (C) 2021 Paul Boddie + * Copyright (C) 2021, 2022 Paul Boddie * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -65,9 +65,10 @@ unsigned int attached = _paging->detach(); - /* Notify the other endpoint. */ + /* Notify the other endpoint and unsubscribe. */ _paging->notify_others(_writing ? PipePaging::WRITER : PipePaging::READER, NOTIFY_PEER_CLOSED); + unsubscribe(); /* Deallocate the paging coordinator if no other endpoints are active. */