Skip to content

Commit

Permalink
Abort tahoe client restarts if already restarting
Browse files Browse the repository at this point in the history
Fixes #149.
  • Loading branch information
crwood committed Feb 8, 2019
1 parent bfd3752 commit 35f5d0a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gridsync/tahoe.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,12 @@ def start(self):
@inlineCallbacks
def restart(self):
log.debug("Restarting %s client...", self.name)
if self.state in (Tahoe.STOPPING, Tahoe.STARTING):
log.warning(
'Aborting restart operation; '
'the "%s" client is already (re)starting',
self.name)
return
# Temporarily disable desktop notifications for (dis)connect events
pref = get_preference('notifications', 'connection')
set_preference('notifications', 'connection', 'false')
Expand Down

0 comments on commit 35f5d0a

Please sign in to comment.