Skip to content

Commit 4417cf1

Browse files
committed
winebuild fix
1 parent b396ab2 commit 4417cf1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/bitmessagemain.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import depends
2222
depends.check_dependencies()
2323

24+
import helper_sql
2425
import getopt
2526
import multiprocessing
2627
# Used to capture a Ctrl-C keypress so that Bitmessage can shutdown gracefully.
@@ -49,6 +50,10 @@
4950
addressGenerator, objectProcessor, singleCleaner, singleWorker, sqlThread)
5051

5152

53+
def wait_until_sql_available():
54+
while not helper_sql.sql_available:
55+
time.sleep(0.25)
56+
5257
def signal_handler(signum, frame):
5358
"""Single handler for any signal sent to pybitmessage"""
5459
process = multiprocessing.current_process()
@@ -178,9 +183,12 @@ def start(self):
178183
sqlLookup.daemon = False
179184
sqlLookup.start()
180185

186+
187+
181188
Inventory() # init
182189

183190
if state.enableObjProc: # Not needed if objproc is disabled
191+
wait_until_sql_available()
184192
shared.reloadMyAddressHashes()
185193
shared.reloadBroadcastSendersForWhichImWatching()
186194

0 commit comments

Comments
 (0)