twrecked / pyaarlo

Asynchronous Arlo Component for Python
GNU Lesser General Public License v3.0
50 stars 34 forks source link

Connection with the arlo account not stopping #71

Open Alexandre-Pe opened 3 years ago

Alexandre-Pe commented 3 years ago

Hello, I don't why but I couldn't logout from my arlo account. The Code from pyaarlo import PyArlo arlo_account = PyArlo(username=USERNAME, password=PASSWORD) print(arlo_account.is_connected) arlo_account.stop() print(arlo_account.is_connected) Expected output True False Actual output True True

Even after calling arlo_account.stop(), I can still access the cameras, get snapshot, etc..., and the Arlo threads still exist. Is there something I didn't understand or is it a bug ?

twrecked commented 3 years ago

That's what you should call but there could well be a bug.

Can you try adding synchronous_mode=True to the PyArlo code.

Alexandre-Pe commented 3 years ago

Even with synchronous_mode=True the ArloBackgroundWorker and ArloEventStream threads are still up and running after calling arlo_account.stop() and I can turn on/off my camera or take snapshots.

twrecked commented 3 years ago

After a quick look at the code I think there is a bug there - the code will keep reconnecting.

I'll test it here and push a fix later.

Alexandre-Pe commented 3 years ago

Thank you !

Alexandre-Pe commented 3 years ago

Hey ! I was wondering if you found a fix for this bug ^^