1.1 --- a/libfsserver/lib/files/file_pager.cc Sun Jun 26 23:44:09 2022 +0200
1.2 +++ b/libfsserver/lib/files/file_pager.cc Sun Jun 26 23:44:34 2022 +0200
1.3 @@ -54,9 +54,10 @@
1.4
1.5 void FilePager::close()
1.6 {
1.7 - /* Notify other users of the file. */
1.8 + /* Notify other users of the file and unsubscribe. */
1.9
1.10 _provider->notify_others(_endpoint, NOTIFY_PEER_CLOSED);
1.11 + unsubscribe();
1.12
1.13 /* Detach the pager, potentially removing the file provider. */
1.14
2.1 --- a/libfsserver/lib/pipes/pipe_pager.cc Sun Jun 26 23:44:09 2022 +0200
2.2 +++ b/libfsserver/lib/pipes/pipe_pager.cc Sun Jun 26 23:44:34 2022 +0200
2.3 @@ -1,7 +1,7 @@
2.4 /*
2.5 * A pipe pager providing access to pipe content and navigation support.
2.6 *
2.7 - * Copyright (C) 2021 Paul Boddie <paul@boddie.org.uk>
2.8 + * Copyright (C) 2021, 2022 Paul Boddie <paul@boddie.org.uk>
2.9 *
2.10 * This program is free software; you can redistribute it and/or
2.11 * modify it under the terms of the GNU General Public License as
2.12 @@ -65,9 +65,10 @@
2.13
2.14 unsigned int attached = _paging->detach();
2.15
2.16 - /* Notify the other endpoint. */
2.17 + /* Notify the other endpoint and unsubscribe. */
2.18
2.19 _paging->notify_others(_writing ? PipePaging::WRITER : PipePaging::READER, NOTIFY_PEER_CLOSED);
2.20 + unsubscribe();
2.21
2.22 /* Deallocate the paging coordinator if no other endpoints are active. */
2.23