Merge pull request #689 from dadav/fix/bt-tether-lock
Add lock to bt-tether
This commit is contained in:
commit
4f153e3899
@ -2,6 +2,7 @@ import logging
|
||||
import os
|
||||
import subprocess
|
||||
import time
|
||||
from threading import Lock
|
||||
|
||||
import dbus
|
||||
|
||||
@ -426,6 +427,7 @@ class BTTether(plugins.Plugin):
|
||||
self.ready = False
|
||||
self.options = dict()
|
||||
self.devices = dict()
|
||||
self.lock = Lock()
|
||||
|
||||
def on_loaded(self):
|
||||
# new config
|
||||
@ -479,6 +481,7 @@ class BTTether(plugins.Plugin):
|
||||
if not self.ready:
|
||||
return
|
||||
|
||||
with self.lock:
|
||||
devices_to_try = list()
|
||||
connected_priorities = list()
|
||||
any_device_connected = False # if this is true, last status on screen should be C
|
||||
|
Loading…
x
Reference in New Issue
Block a user