aboutsummaryrefslogtreecommitdiff
path: root/src/usb-manager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/usb-manager.cpp')
-rw-r--r--src/usb-manager.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/usb-manager.cpp b/src/usb-manager.cpp
index 9f67720..ce546fe 100644
--- a/src/usb-manager.cpp
+++ b/src/usb-manager.cpp
@@ -50,6 +50,8 @@ public:
});
m_greeter->state().changed().connect([this](Greeter::State /*state*/) {
+g_message("%s clearing old snap, if any", G_STRLOC);
+ clear_snap();
g_message("%s greeter state changed; calling maybe_snap()", G_STRLOC);
maybe_snap();
});
@@ -67,11 +69,16 @@ g_message("%s greeter state changed; calling maybe_snap()", G_STRLOC);
private:
- void clear()
+ void clear_snap()
{
- // clear out old state
m_snap_connections.clear();
m_snap.reset();
+ }
+
+ void clear()
+ {
+ // clear out old state
+ clear_snap();
m_req = decltype(m_req)();
m_adbd_client.reset();
}