Skip to content

Commit

Permalink
+1
Browse files Browse the repository at this point in the history
  • Loading branch information
hakaishi committed Nov 12, 2020
1 parent 47d3ea5 commit 1126be2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions thread_work.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,17 @@ def _do_work(self):
sleep(0.1)
continue

self._running = True

while self._connection is None and not self._abort and not self._quitting: # suspend thread until there is an connection
# print("waiting for connection")
sleep(0.3)
continue
if self._quitting:
return
if self._abort:
continue

self._running = True

if data:
try:
func(self._connection, *data)
Expand Down

0 comments on commit 1126be2

Please sign in to comment.