Skip to content

Commit e691f8d

Browse files
committed
Close the protobuf session on shutdown
1 parent 242db96 commit e691f8d

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

flipper_api.py

+4
Original file line numberDiff line numberDiff line change
@@ -143,5 +143,9 @@ def write(self, path, data):
143143
with self.mutex:
144144
self._cmd_storage_write(path, data)
145145

146+
def close(self):
147+
with self.mutex:
148+
self.proto.cmd_flipper_stop_session()
149+
146150
class InvalidNameError(RuntimeError):
147151
pass

flipper_fs.py

+3
Original file line numberDiff line numberDiff line change
@@ -189,3 +189,6 @@ def unlink(self, path):
189189
cached = self.get_file_by_path(path)
190190
self.api.delete(path, True)
191191
cached['parent']['children'].remove(cached)
192+
193+
def close(self):
194+
self.api.close()

fzfs.py

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ def main():
5555
fuse.FUSE(backend, args.mountpoint, foreground=True)
5656
print('fuse stopped')
5757

58+
backend.close()
5859
flsrl.close()
5960

6061
if __name__ == '__main__':

0 commit comments

Comments
 (0)