Skip to content

Commit

Permalink
Merge pull request #125 from Mimoja/develop
Browse files Browse the repository at this point in the history
BlueZDBus: Unexport app and advertisement on stop()
  • Loading branch information
kevincar authored Jan 26, 2024
2 parents 8f010d0 + 059118f commit 7572b6a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions bless/backends/bluezdbus/dbus/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ async def stop_advertising(self, adapter: ProxyObject):
await iface.call_unregister_advertisement( # type: ignore
advertisement.path
)
self.bus.unexport(advertisement.path)

async def is_connected(self) -> bool:
"""
Expand Down
3 changes: 3 additions & 0 deletions bless/backends/bluezdbus/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ async def stop(self) -> bool:
# Unregister
await self.app.unregister(self.adapter)

# Remove our App
self.bus.unexport(self.app.path, self.app)

return True

async def is_connected(self) -> bool:
Expand Down

0 comments on commit 7572b6a

Please sign in to comment.